css trouble with centering a horizontal unordered list -
i have had trouble centering unordered list using navigation. have looked @ other advice , tried fix code hot mess. cannot figure out life of me going wrong. solutions have tried still not center list in window. adding overflow:visable stretch out not 100% , not expand when window grows.
#navbar { position: fixed; top:-17px; margin-bottom: 10px; font-family:verdana, geneva, sans-serif; margin: 0; padding: 0;
}
#navbar ul > li { display: inline-block; float: none; color:white; font-size: 14px; margin-right: 35px; margin-left: 35px; padding: .2em 1em; overflow:visible;
}
is looking for?
http://jsfiddle.net/talymo/6fgbw/
#navbar { position:fixed; list-style:none; margin:0; padding:0; width:100%; text-align:center; } #navbar li{ padding:10px; display:inline-block; } <ul id="navbar"> <li>thing 1</li> <li>thing 2</li> <li>thing 3</li> </ul>
Comments
Post a Comment