Using CSS to align a div to the very bottom of the page (inc. other absolute divs)

A

Andrew

Hi guys,

I'm trying to get a div to go across the bottom of a page. The page in
question has a 2 column layout, the left column is an absolutely
positioned div that goes all the way from the top of the page to the
bottom (and it has a background colour). The right is just a div with a
large margin to seperate it from the left column.

On some pages the left column is the longest item, and on others the
right column is.

Is there any way I can get something to appear at the bottom of the
page under the two columns. If the user drags their browser window big
enough to not need to scroll then it should still stick to the bottom
of the window rather then the half way up where the page ends.

I have tried

body{ position:relative; }
#footer{ position:absolute; bottom: 0;}

but this will only stick to the static column even if the absolute left
hand column is higher.


I'm sure by fiddling around with various floats and clears etc I may be
able to get something that works but is there now way to reference the
very bottom of the page if absolute elements go below the page content?
Thanks
Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top