Create equal height divs with borders - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Div Border

Description

Create equal height divs with borders

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

div.justified-divs{
   background: #090;
   position: relative;
}
div.justified-divs div{
   width: 30%;
   background: #fff;
   top:0;
   bottom:0;
   border: 1px solid red;
}
.one{<!--from w w w .j  a v a2 s  .  c  om-->
   left:0;
   position: absolute;
}
.longest{
   margin-left: 70%;
}
.two{
   position: absolute;
   left: 35%;
}


      </style> 
 </head> 
 <body> 
  <div class="justified-divs"> 
   <div class="one"> 
    <p>column</p> 
   </div> 
   <div class="two"> 
    <p>column</p> 
    <p>column</p> 
   </div> 
   <div class="longest"> 
    <p>column</p> 
    <p>column</p> 
    <p>column</p> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials