align all li on one line - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Alignment

Description

align all li on one line

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <style type="text/css">
ul<!--from  w w w  . ja  v  a 2 s  .  co  m-->
 {
   overflow-x:hidden;
   white-space:nowrap;
   height:2em;
   width:100%;
}

li
 {
   display:inline;
}
</style> 
 </head> 
 <body> 
  <ul> 
   <li>Lorem ipsum dolor sit amet</li> 
   <li>Lorem ipsum dolor sit amet</li> 
   <li>Lorem ipsum dolor sit amet</li> 
   <li>Lorem ipsum dolor sit amet</li> 
   <li>Lorem ipsum dolor sit amet</li> 
   <li>Lorem ipsum dolor sit amet</li> 
   <li>Lorem ipsum dolor sit amet</li> 
  </ul>  
 </body>
</html>

Related Tutorials