cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <h1>Comparison Table using UL lists and CSS flexbox. Responsive and Easy to Customize.</h1>


<div class="comparisontable">

	<ul class="row">
		<li class="legend">Office Chairs</li>
		<li><img src="https://image.ibb.co/ksjS3y/Zenith_chair.jpg" /><br />Eurotech</li>
		<li><img src="https://image.ibb.co/ksjS3y/Zenith_chair.jpg" /><br />Hbada</li>
		<li><img src="https://image.ibb.co/ksjS3y/Zenith_chair.jpg" /><br />Zenith</li>
		<li><img src="https://image.ibb.co/ksjS3y/Zenith_chair.jpg" /><br />Amazonbasics</li>
	</ul>
	
	<ul class="row">
		<li class="legend">Weight</li>
		<li>25kg</li>
		<li>13kg</li>
		<li>17kg</li>
		<li>28kg</li>
	</ul>
	
	<ul class="row">
		<li class="legend">Cost</li>
		<li>$$</li>
		<li>$</li>
		<li>$$</li>
		<li>$</li>
	</ul>
	
	<ul class="row">
		<li class="legend">Delivery</li>
		<li>Domestic</li>
		<li>International</li>
		<li>International</li>
		<li>Domestic</li>
	</ul>
	
	<ul class="row">
		<li class="legend">Verdict</li>
		<li>Best Chair for Back Pain</li>
		<li>Best budget chair</li>
		<li>All Mesh for Cooling</li>
		<li>Only Chair with Top Grain Leather</li>
	</ul>
	
	<ul class="row">
		<li class="legend"></li>
		<li><a href="http://ergonomictrends.com/best-ergonomic-office-chairs-reviews-buyers-guide/" class="calltoaction" rel="nofollow">Buy Now</a></li>
		<li><a href="http://ergonomictrends.com/best-ergonomic-office-chairs-under-200-reviews/" class="calltoaction" rel="nofollow">Buy Now</a></li>
		<li><a href="http://ergonomictrends.com/best-ergonomic-office-chairs-under-300-reviews/" class="calltoaction" rel="nofollow">Buy Now</a></li>
		<li><a href="http://ergonomictrends.com/best-ergonomic-office-chairs-under-100-reviews/" class="calltoaction" rel="nofollow">Buy Now</a></li>
	</ul>

</div>
            
          
!
            
              div.comparisontable{
  display: flex;
  flex-direction: column;
}

div.comparisontable img{
  max-width: 100%;
  width: auto;
  height: auto;
}


div.comparisontable ul.row{
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  flex: 1;
  width: 100%;
  flex-wrap: wrap;
}

div.comparisontable ul.row li{
  background: #c9f4ca;
  flex: 1;
  padding: 10px;
  border-bottom: 1px solid gray;
}

div.comparisontable ul.row li.legend{
 	background: #6640d8;
  color: white;
  font-weight: bold;
  border: none;
  width: 200px;
  border-bottom: 1px solid white;
}

div.comparisontable ul.row li:last-of-type{
}

/* very first row */
div.comparisontable ul.row:first-of-type li{
  text-align: center;
}

/* very last row */
div.comparisontable ul.row:last-of-type li{
  text-align: center;
  border-bottom: none;
  box-shadow: 0 6px 6px rgba(0,0,0,0.23);
}

div.comparisontable a.calltoaction{
  color: white;
  background: #e12525;
  display: inline-block;
  padding: 8px 10px;
  text-decoration: none;
  border-radius: 8px;
  margin: .1em auto;
}

div.comparisontable a.calltoaction:hover{
  background: #d11212;
}


/* first and last cell within legend column */
div.comparisontable ul.row:first-of-type li.legend.legend,
div.comparisontable ul.row:last-of-type li.legend{
  background: transparent;
  box-shadow: none;
}

@media screen and (max-width:650px){
  
  div.comparisontable ul.row{
    flex-direction: column;
  }
  
  div.comparisontable img{
    width: auto;
    height: auto;
  }
  
  div.comparisontable ul.row li{
    margin-right: 0;
		flex: auto;
    width: auto;
  }
  
  /* first and last cell within legend column */
  div.comparisontable ul.row:first-of-type li.legend.legend,
  div.comparisontable ul.row:last-of-type li.legend{
    display: none;
  }
  
  div.comparisontable ul.row li.legend{
    width: auto;
  }
}
            
          
!
999px
Loading ..................

Console