Make flexbox columns to be the same height - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Flex Column

Description

Make flexbox columns to be the same height

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">

.container {<!--  w  w w.  jav  a  2s  . com-->
   width: 800px;
   padding: 0 15px;
}
.row-flex {
   display: -webkit-box;
   display: -ms-flexbox;
   display: flex;
   margin-right: -15px;
   margin-left: -15px;
   flex-wrap: wrap;
}
.flexbox {
   flex: 0 0 33%;
   padding: 0 15px;
   border: 1px dashed red; 
   display: flex; 
}
.icon-box-1 {
   position: relative;
   margin-bottom: 50px;
   background: #fff;
   text-align: center;
   border: 1px solid #eee;
   padding: 10px;
}


      </style> 
 </head> 
 <body> 
  <div class="container"> 
   <div class="row-flex"> 
    <div class="flexbox"> 
     <div class="icon-box-1"> 
      <h1> One </h1> 
      <h3>Title</h3> 
      <p>
      this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test 
      this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test 
      this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test 
      this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test 
      lots of random text, lots of random text, lots of random text, lots of random text</p> 
     </div> 
    </div> 
    <div class="flexbox"> 
     <div class="icon-box-1"> 
      <h1> Two </h1> 
      <h3>Title</h3> 
      <p>lots of random text</p> 
     </div> 
    </div> 
    <div class="flexbox"> 
     <div class="icon-box-1"> 
      <h1> Three </h1> 
      <h3>Title</h3> 
      <p>
      this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test 
      this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test 
      this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test 
      this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test 
      this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test 
      
      lots of random text, lots of random text, lots of random text, lots of random text</p> 
     </div> 
    </div> 
    <div class="flexbox"> 
     <div class="icon-box-1"> 
      <h1> Four </h1> 
      <h3>Title</h3> 
      <p>lots of random text, lots of random text, lots of random text</p> 
     </div> 
    </div> 
    <div class="flexbox"> 
     <div class="icon-box-1"> 
      <h1> Five </h1> 
      <h3>Title</h3> 
      <p>lots of random text, lots of random text, lots of random text</p> 
     </div> 
    </div> 
    <div class="flexbox"> 
     <div class="icon-box-1"> 
      <h1> Six </h1> 
      <h3>Title</h3> 
      <p>lots of random text, lots of random text, lots of random text</p> 
     </div> 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials