Jump to content

Trying to center navigation menu


itskimical
 Share

Recommended Posts

I am trying to center this menu. Right now it is a local site uploaded through WAMP - but here is the css. .main-navigation {clear: both;display: block;padding: 1.5em;}.main-navigation:after {clear: both;content: "";display: block;}.main-navigation ul {list-style: none;margin: 0 auto;padding-left: 0;}.main-navigation li {float: left;margin: 0.5em 0;position: relative;}.main-navigation a {color: #7c948a;display: block;font-size: 1.4rem;font-weight: bold;margin-right: 2em;text-decoration: none;}.main-navigation ul ul {background: #e9e0d1;border: 1px solid rgba( 0, 0, 0, 0.1 );display: none;float: left;position: absolute;top: 1.2em;left: 0;z-index: 99999;}.main-navigation ul ul ul {left: 100%;top: 0;}.main-navigation ul ul a {padding: 0 1.5em;width: 200px;}.main-navigation ul ul li {}.main-navigation li:hover > a,.main-navigation li.current_page_item a,.main-navigation li.current-menu-item a,.main-navigation ul ul a:hover {color: #33605a;}.main-navigation ul ul :hover > a {}.main-navigation ul li:hover > ul {display: block;} Any ideas?

post-40173-0-41137500-1369176152_thumb.jpg

Link to comment
Share on other sites

.main-navigation {clear: both;display: block;padding: 1.5em;position:relative;/*added by dsonesuk*/left:50%; /*added by dsonesuk*/float:left; /*added by dsonesuk*/}.main-navigation ul {position:relative; /*added by dsonesuk*/left:-50%; /*added by dsonesuk*/list-style: none;margin: 0 auto;padding-left: 0;}

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...