Forum Moderators: not2easy

Message Too Old, No Replies

Fill footer height with background color

         

norbiu

2:33 pm on Mar 12, 2009 (gmt 0)

10+ Year Member



I am creating a page with very little content, so when I maximize the browser window, it will leave about 50px of white space below the footer.

I'm not looking for a sticky footer solution, because that wouldn't look right.

I'd like the footer to not have a fixed height, so when I maximize the window, to fill that white space below it with the background color I set, just like with the 100% width setting.

I googled it, but I can only find sticky footer solutions.

janharders

3:40 pm on Mar 12, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



so you basically just want 100% height?
in css, add
html, body { height: 100%; }
if your container's id is "container"
add
#container {
min-height: 100%;
height: 100%;
}

* html #container {
height: 100%;
}

so the less-able browsers will understand it, too.