0

My website has varaible content length, and this sometime means that the footer does not site at the bottom of the page, is there a way to make the footer fill whatever space is left?

http://www.ibdnetwork.co.uk/members-content/forums

sea_1987
  • 2,812
  • 12
  • 43
  • 68

3 Answers3

1

Take a look at excellent post at CSS-Tricks.Com:

See the demo here :)

Sarfraz
  • 367,681
  • 72
  • 526
  • 573
1

css

#footer {
  position:fixed !important;
  bottom:0;
}

This should do it. You can add a padding on your content wrapper that have the height of your footer + 50px or something like that, for spacing between content and footer. The footer will be on top of your content else.

EastDane
  • 137
  • 1
  • 10
0

There are multiple approaches to this problem. One is to have

html, body { height:100%; }

in your CSS. This, however, might create issues on pages that scroll vertically. For complex cases you will have to resort to JavaScript onResize coding.

See if this helps:

How do I force a DIV block to extend to the bottom of a page even if it has no content?

Community
  • 1
  • 1
Don
  • 1,550
  • 3
  • 22
  • 35