Anonymous 0


I'm about to place a div (height 30px) at the bottom of a HTML page. On some pages there will be a scroll, then the div should be placed at the very end of the page (not like Facebook's always visible), sometimes the content is very short. Then it should be placed at the very bottom of the browser.

If I should do it with tables it should look something like this:

<table height="100%">
<tr><td>Content of page</td></tr>
<tr><td height="30">Footer</td></tr>

How to do this without tables? Is it possible?

2 answers

This was chosen as the best answer

This will do it:

always at the bottom of the page or the bottom of the window, depending on how much content you have.

Answered over 9 years ago by Tony Crockford
  • Just what I was looking for! Thank you very much! Robert Lord over 9 years ago
  • Oh, how could I have missed this link/solution before >_< Jens Hedqvist over 9 years ago

Another option available to you would be the tag new in HTML 5:

Although of course not supported in IE (I feel like I should just make that phrase a signature) it's something to keep an eye on.

Then you can just style the tag in CSS to stay at the bottom of the page.

Answered over 9 years ago by Jim Holby