List items in navigation bar/unordered list stay left justified - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Nav Bar Item

Description

List items in navigation bar/unordered list stay left justified

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
#navBarList<!-- w w w  . j a v a2s  . c  o m-->
 {
   overflow:hidden;
   border-width:4px;
   border-color:Chartreuse;
   border-style:solid;
}

#navBarList li
 {
   list-style-type:none;
   width:26%;
   float:left;
}
</style> 
 </head> 
 <body> 
  <div id="navBarDiv"> 
   <ul id="navBarList"> 
    <li>Lorem</li> 
    <li>Lorem i</li> 
    <li>Lor</li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials