Get a Sticky Footer working - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Footer stick to bottom

Description

Get a Sticky Footer working

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">
* {<!--from  w  w  w.  j a  v  a2  s  .co m-->
   margin:0;
}

html, body {
   height:100%;
}

.wrapper {
   min-height:100%;
   height:auto !important;
   height:100%;
   margin:0 auto -5em;
}

.footer, .push {
   height:5em;
}
</style> 
 </head> 
 <body> 
  <div class="wrapper"> 
   <p>Lorem ipsum dolor sit amet</p> 
   <div class="push"></div> 
  </div> 
  <div class="footer"> 
   <p>Lorem ipsum dolor s</p> 
  </div>  
 </body>
</html>

Related Tutorials