make two separate columns the same length - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:2 Column

Description

make two separate columns the same length

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <title>2cols:display:flex</title> 
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> 
  <style>

body {<!--from w  w w .  j a  va2 s .co  m-->
   background:#333;
}
.doublecol {
   display:flex;
}
.singleArrow{
   margin:0 auto;
   width:0;
   border-top:25px solid red;;
   border-right:25px solid white;
   border-left:25px solid white;
   background:gray;
   margin:20px auto;
}
.leftCol,
.rightCol{
   background:white;
   width:300px;
   margin:20px 40px;
}
.sectionBlock {
   box-sizing: border-box;
   -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
   -moz-box-sizing: border-box;    /* Firefox, other Gecko */
   box-sizing: border-box;         /* Opera/IE 8+ */
   background-color: rgb(246,246,246);
   margin-top: 20px;
   padding: 4px 0 0 10px;
   padding-bottom:20px;
}
.sectionBlockContent{
   padding: 30px 20px 10px 30px;
}
.sectionBlockContentNarrow{
   padding: 30px 10px 10px 10px;
}


      </style> 
 </head> 
 <body translate="no"> 
  <div class="doublecol"> 
   <div class="leftCol"> 
    <div class="singleArrow"></div> 
    <div class="sectionBlock"> 
     <div class="sectionBlockContentNarrow">
       SOME TEXT 
     </div> 
    </div> 
   </div> 
   <div class="rightCol"> 
    <div class="singleArrow"></div> 
    <div class="sectionBlock"> 
     <div class="sectionBlockContentNarrow">
       SOME TEXT SOME TEXT SOME TEXT SOME TEXT SOME TEXT SOME TEXT SOME TEXT SOME TEXT SOME TEXT 
     </div> 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials