Center Menu Navigation
I have figured out how to center the logo, but cannot get the navigation to center as well. Hopefully you guys can help! Code for centering logo: #header #logo{ float: none !import
Solution 1:
This should do it:
#navigation{
float:none;
text-align:center;
}
#navigation > ul{
float:none !important;
display:inline-block;
}
Solution 2:
You can use text-align: center
on the <nav>
tag and display: inline-block
to the <ul>
.
You also need remove float: right
from #header #navigation
and #header #navigation ul.nav
.
You also don't need #header #navigation
, as ids are unique #navigation
should be enough.
#navigation {
float: none;
text-align: center;
}
#navigationul.nav {
display: inline-block;
float: none;
}
Post a Comment for "Center Menu Navigation"