make grid style of specific width - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Width

Description

make grid style of specific width

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">
.grid div {<!--  ww  w  .j  a v  a2 s .  co  m-->
   display:inline-block;
   width:51px;
   height:76px;
   margin:11px;
   border:4px solid Chartreuse;
}

.grid
 {
   width:301px;
}
</style> 
 </head> 
 <body> 
  <div class="grid"> 
   <div>
     Lorem ipsum do 
   </div> 
   <div>
     Lorem ipsum do 
   </div> 
   <div>
     Lorem ipsum do 
   </div> 
   <div>
     Lorem ipsum do 
   </div> 
   <div>
     Lorem ipsum do 
   </div> 
   <div>
     Lorem ipsum do 
   </div> 
   <div>
     Lorem ipsum do 
   </div> 
   <div>
     Lorem ipsum do 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials