atmananda Posted April 1, 2013 Share Posted April 1, 2013 Hi, I am having a lot of trouble trying to center the navigation on my site.Basically the tabs need to sit in the center of the div (960px) with a 2px gap between each tab.Can anyone see what I'm doing wrong? THANKYOU!! .row { margin: 0 auto; width: 960px;} #top-menu{ font-family: "LeagueGothicRegular",sans-serif; text-align: center; margin-top:240px; } #top-menu li{ display: block; float: left; line-height: 1; margin: 0 17px; text-align: center; } #top-menu a{ font-family: 'LeagueGothicRegular', sans-serif; background-color: #fff; border-top-left-radius: 5px; border-top-right-radius: 5px; color: #000000; display: inline-block; font-size: 1.97em; line-height: 1; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3); padding: 6px 18px; text-decoration: none} #top-menu a:hover,#top-menu .active a{ color: #fff; background: #E80B44; }#top-menu a:hover .nav-arrow{ border-top-color: {{settings.nav_hover_colour}}; } #top-menu ul .first ul{ left: 0; } #top-menu ul ul li{color: #000000; display: inline-block; font-family: 'LeagueGothicRegular', sans-serif; text-shadow: 1px 1px 1px transparent; } #top-menu ul ul { font-family: 'LeagueGothicRegular', sans-serif; display: inline-block; border: none; text-shadow: 1px 1px 1px transparent; } #top-menu > ul > li { font-family: 'LeagueGothicRegular', sans-serif; } Link to comment Share on other sites More sharing options...
atmananda Posted April 1, 2013 Author Share Posted April 1, 2013 no one? Link to comment Share on other sites More sharing options...
newseed Posted April 1, 2013 Share Posted April 1, 2013 Change the display: block to be inline and remove the float: left #top-menu li{display: inline;/*removed float: left; */ line-height: 1;margin: 0 17px;text-align: center;} Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now