Center menus in Genesis
It drives me nuts that there’s no obvious, easy way to center the nav bar in Genesis (or, to be fair, in most WordPress themes/frameworks). Stumbled across this the other day and found it works really well.
If you are using a subnav, change #nav to #subnav in the above CSS. If you are using both the top menu and the bottom menu, use two versions of the CSS: one for #nav and one for #subnav. It is possible to write it as, for example, #nav .wrap, #subnav .wrap {} etc… to minimize page sizes.
(Lifted from journalxtra.com)
Massive thanks – worked a treat.
Glad we could help!
a MILLION THANKS! Been looking for this for MONTHS!
We’re happy you stumbled across the answer here! If you have any trouble, check out the source article linked at the end of our post.
AMAZING! Thank you so so much! I have been looking for this for weeks.
Any idea how to center a logo as well?
George, that would depend on how your header is constructed. For instance, on this page we’d have to drop the menu out of the header, take float:left off the .header-image #title-area div, and set it to {margin: 0 auto}.
Thank you so much! It was so helpful! I still can’t believe it is necessary to copy so much code to do just that one thing, but it works!!!
Glad it works for you!
Thank you so much. Love this. … One quick question… My “hand-drawn” divider is now cut short to length of the navigation menu. Any ideas how to fix this? Thank you.
Michelle, you simply need to move your style from .genesis-nav-menu.menu-primary to #nav, so :
#nav { background: url(http://www.mospensstudio.com/blog/wordpress/wp-content/themes/MospensStudio/images/hand-drawn-line-illustration-3.jpg) 50% 100% repeat-x; }
Thank you so much! 🙂
Thanks! The divider line below the nav menu isn’t showing. Any ideas on how to make it reappear?
Sure. Assuming you want it to look like the divider line above the nav menu you would add
#nav {
toborder-bottom: 2px solid #1E1E1E;
style.css
Thanks Joe! Worked like a charm.
Hi!
Can I use this in the last update of Genesis Framework
I believe so, yes. I haven’t had to use it in awhile, though. Have you tested it?