Style ul li to look like table - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Element

Description

Style ul li to look like table

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">
ul {<!-- ww w  .  j a v  a 2  s. co m-->
   width:76px;
   overflow:hidden;
   height:100px;
   position:relative;
}

ul li {
   float:left;
   width:21px;
   list-style:none;
}

.last
 {
   float:right;
   position:absolute;
   top:0;
   right:0;
}
</style> 
 </head> 
 <body> 
  <ul> 
   <li>L</li> 
   <li>L</li> 
   <li>L</li> 
   <li style="clear:left;">L</li> 
   <li>L</li> 
   <li>L</li> 
   <li style="clear:left;">L</li> 
   <li>L</li> 
   <li style="clear:right;">L</li> 
   <li class="last">Lo</li> 
  </ul>  
 </body>
</html>

Related Tutorials