Keep Footer at bottom inside a container - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Footer aligned bottom

Description

Keep Footer at bottom inside a container

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <title>Lorem ipsum dolo</title> 
  <style>
.relative_small {
   position:relative;
   display:block;
   height:301px;
   width:201px;
   float:left;
   margin:11px;
   background-color:Chartreuse;
}

.relative_big {<!--   w w w  . ja va  2s .  c o m-->
   position:relative;
   display:block;
   height:601px;
   width:201px;
   float:left;
   margin:11px;
   background-color:yellow;
}

.absolute_bottom {
   position:absolute;
   bottom:0;
   background-color:blue;
   width:201px;
   height:11px;
}
</style> 
 </head> 
 <body translate="no"> 
  <div class="relative_small"> 
   <div class="absolute_bottom"></div> 
  </div> 
  <div class="relative_big"> 
   <div class="absolute_bottom"></div> 
  </div>  
 </body>
</html>

Related Tutorials