Vertical align DIV to bottom - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Div

Description

Vertical align DIV to bottom

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

.parent {<!--from  w ww. j av a2  s  .c  o  m-->
   width: 100%;
   height: 20rem;
   border: 1px solid black;
   display: block;
}
.child {
   border: 1px solid red;
   display: block;
}
.bottom {
   display: block;
   margin-top: 17.5rem;
}


      </style> 
 </head> 
 <body> 
  <div class="parent"> 
   <div class="bottom"> 
    <div class="child">
      abcdfg 
    </div> 
    <div class="child">
      abcdfg 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials