Create 4 column grid with an unordered list - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:4 Column

Description

Create 4 column grid with an unordered list

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">
.products {<!--   w  ww .  j av  a  2  s .c  om-->
   margin-top:21px;
}

.products .products-list {
   padding:0;
   list-style:none;
   width:100%;
   background-color:Chartreuse;
   display:flex;
   flex-flow:row wrap;
   justify-content:space-between;
}

.products .products-list li {
   width:25%;
   height:100px;
   margin-bottom:11px;
   background:yellow;
}
</style> 
 </head> 
 <body> 
  <div class="products"> 
   <ul class="products-list"> 
    <li></li> 
    <li></li> 
    <li></li> 
    <li></li> 
    <li></li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials