Spread li elements over ul - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Element

Description

Spread li elements over ul

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 li {
   float:left;
   color:Chartreuse;
   width:21%;
   background:yellow;
}

ul li:first-child {
   margin-right:11%;
}

ul li:last-child {
   width:41%;
   margin-left:11%;
}
</style> <!--from  w w  w .ja v  a2  s. co  m-->
 </head> 
 <body> 
  <ul> 
   <li>Lorem</li> 
   <li>Lorem </li> 
   <li>Lorem</li> 
  </ul>  
 </body>
</html>

Related Tutorials