Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 23rd, 2012  |  syntax: None  |  size: 0.46 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Why does my footer go all the way down?
  2. #footer {
  3.     position:absolute;
  4.     bottom:0;
  5.     left:0;
  6.     right:0;
  7.     margin: 0 auto;
  8.     font-size: 12px;
  9.     font-weight: normal;
  10.     clear:both;
  11.     padding: 10px 0px 10px 0px;
  12.     text-align: center;
  13. }
  14.        
  15. body
  16. {
  17.   height:100%;
  18. }
  19.        
  20. #container
  21. {
  22.   min-height: 100%;
  23.   position: relative;
  24. }
  25.        
  26. #footer
  27. {
  28.   position: absolute;
  29.   bottom: 0;
  30.   width: 100%;
  31.   height: 30px; /* can be changed, along with padding */
  32. }