Distribute <li> elements inside a div - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Element

Description

Distribute <li> elements inside a div

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">
body {<!--from   w  w  w.jav  a 2 s. c o m-->
   direction:rtl;
}

div.wrapper {
   width:961px;
   margin:0 auto;
}

ul {
   border:6px solid Chartreuse;
   display:table;
   width:100%;
   margin:0;
   padding:0;
}

ul li.menu {
   display:table-cell;
   height:121px;
   text-align:center;
   padding:56px 0 0 0;
   border:9px solid;
   font-size:26px;
}
</style> 
 </head> 
 <body> 
  <div class="wrapper"> 
   <ul> 
    <li class="menu red">L</li> 
    <li class="menu blue">L</li> 
    <li class="menu yellow">L</li> 
    <li class="menu yellow">L</li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials