Sticky footer CSS


/ Published in: CSS
Save to your folder(s)



Copy this code and paste it in your HTML
  1. html, body {height: 100%;}
  2.  
  3. #wrapper1 {min-height: 100%;}
  4.  
  5. #wrapper2 {
  6. overflow:auto;
  7. padding-bottom: 16.5em; /* must be same height as the footer */
  8. }
  9.  
  10. #footer {
  11. margin: -16.5em 0 0 0; /* negative value of footer height */
  12. height: 16.5em;
  13. }
  14.  

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.