Closed (fixed)
Project:
Zen
Version:
7.x-5.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Jun 2013 at 23:52 UTC
Updated:
28 Aug 2013 at 11:33 UTC
Lost hours on this simple thing.
How do I center the main navigation menu in a zen subtheme?
I know that I need to :-
"change the styling from floats to inline boxes. And then use text-align: center."
Would someone be kind enough to flesh the solution out a little?
Thanks
Comments
Comment #1
greg.b commentedOK........ hopes this helps someone.
I brushed up on my CSS which was a good thing.
I got it to work by adding:-
#navigation {
text-align: center;
}
#navigation ul.menu li {
float: none;
}
Comment #2
greg.b commentedComment #3
criscomThis only applies to a vertical menu. If you apply your code to a horizontal menu it breaks.
Comment #4
criscomApply #navigation {text-align: center} and to ul.nice-menu li {display: inline-block; float: none;} to center the main navigation horizontally in the zen theme.