justify a horizontal list - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Horizontal

Description

justify a horizontal list

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">
#Navigation1, #Navigation2, #Navigation3 {
   background:Chartreuse;
   margin-top:31px;
   height:21px;
}

#Navigation1 li, #Navigation2 li, #Navigation3 li {
   list-style-type:none;
   text-align:center;
   float:left;
   width:51%;
}

#Navigation2 li {
   width:34%;
}

#Navigation3 li {
   width:26%;
}
</style> <!-- w w  w  .  ja v a2 s  . com-->
 </head> 
 <body> 
  <ul id="Navigation1"> 
   <li> <a href="About.html">Lorem</a> </li> 
   <li> <a href="Contact.html">Lorem i</a> </li> 
   <!-- ... --> 
  </ul> 
  <ul id="Navigation2"> 
   <li> <a href="Home.html">Lore</a> </li> 
   <li> <a href="About.html">Lorem</a> </li> 
   <li> <a href="Contact.html">Lorem i</a> </li> 
   <!-- ... --> 
  </ul> 
  <ul id="Navigation3"> 
   <li> <a href="Home.html">Lore</a> </li> 
   <li> <a href="News.html">Lore</a> </li> 
   <li> <a href="About.html">Lorem</a> </li> 
   <li> <a href="Contact.html">Lorem i</a> </li> 
   <!-- ... --> 
  </ul>  
 </body>
</html>

Related Tutorials