put a footer to bottom - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Footer aligned bottom

Description

put a footer 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">
.bg-green {<!--from   w  w  w  .j  av a2  s.  c  o m-->
   width:100%;
   height:100px;
   background-color:Chartreuse;
}

.content {
   width:81%;
   height:301px;
   margin:-51px auto;
   background-color:yellow;
   text-align:center;
   padding-top:100px;
}

footer {
   width:100%;
   height:66px;
   background-color:blue;
   opacity:0.6;
}
</style> 
 </head> 
 <body> 
  <div class="bg-green"> 
  </div> 
  <div class="content">
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum 
  </div> 
  <footer>
    Lorem ipsum dolor si 
  </footer>  
 </body>
</html>

Related Tutorials