Fri, 2013-01-11 15:46
Hi All,
The main navigation menu on wordpress twenty twelve theme is left aligned by default.
I am trying to center align the menu on my child theme but just cannot figure it out. The "li" items currently align left and I want them to align center within the main nav bar. Any suggestions?
Site is http://www.inmotionphysio.ie/wip
Sat, 2013-01-12 01:01
#1
Here's a method you could use
Here's a method you could use to move it the center by force. You see this part of the css:
} .main-navigation ul.nav-menu { background: none repeat scroll 0 0 #F0942C; border: 0 none; padding: 0 0 0 10px; }
It centers it if you put a padding of 200px
} .main-navigation ul.nav-menu { background: none repeat scroll 0 0 #F0942C; border: 0 none; padding: 0 0 0 200px; }
I know it works because I just did it to your menu using the Firebug plugin in firefox
Sat, 2013-01-12 01:32
#2
Since the li elements are
Since the li elements are inline-block, I'd simply set the ul to {text-align: center}, e.g.
.main-navigation ul.nav-menu { background: none repeat scroll 0 0 #F0942C; border: 0 none; padding: 0 0 0 10px; text-align: center; }
cheers,
gary