Posted By

catchatpas on 07/19/11


Tagged

css


Versions (?)

Sticky Footer


 / Published in: CSS
 

URL: http://www.cssstickyfooter.com/using-sticky-footer-code.html

  1. html, body {height: 100%;}
  2.  
  3. #wrap {min-height: 100%;}
  4.  
  5. #main {overflow:auto;
  6. padding-bottom: 150px;} /* must be same height as the footer */
  7.  
  8. #footer {position: relative;
  9. margin-top: -150px; /* negative value of footer height */
  10. height: 150px;
  11. clear:both;}
  12.  
  13. /*Opera Fix*/
  14. body:before {
  15. content:"";
  16. height:100%;
  17. float:left;
  18. width:0;
  19. margin-top:-32767px;/
  20. }
  21.  
  22.  
  23. <!--[if !IE 7]>
  24. <style type="text/css">
  25. #wrap {display:table;height:100%}
  26. </style>
  27. <![endif]-->

Report this snippet  

You need to login to post a comment.