Vertical align two columns, one is shorter and the other is longer - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:2 Column

Description

Vertical align two columns, one is shorter and the other is longer

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

.test{position:relative;}
.test>div{
   float:left;
   margin:8px;
   width:100px;
   background-color:blue;
}


      </style> 
 </head> <!--from w  w w . j  a  v a2  s  .  co m-->
 <body> 
  <div class="test"> 
   <div class="div1">
     Left options 
   </div> 
   <div class="div2">
     Username: this is a test this test
   </div> 
   <div class="div3">
     Right Div 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials