Reputation: 15007
Let's say for example:
<header>Hello</header>
<div role="main">Body</div>
<footer>©</footer>
header {
height:20px;
background: #edf1f5;
}
div {
background:#ddd;
padding:20px;
}
footer {
background: #e4e8ec;
}
How do you make footer
take up all the remaining space? I am not aiming to have a sticky footer here, I just want the footer to fill up the space.
Here's a Jsfiddle: http://jsfiddle.net/XF3E7/
Upvotes: 1
Views: 333
Reputation: 60737
I guess you want something like this? http://jsfiddle.net/Ralt/XF3E7/5/
But no scrolling heh? It's not possible without javascript or using tables.
I'd indeed suggest using a background color as @Ollie said.
Upvotes: 0
Reputation: 656
I've always used a work around for this. If you make the body background colour the same as the footer it creates the illusion of it extending down the page. http://jsfiddle.net/ollie/q3xzh/1/
header {
height:20px;
background: #edf1f5;
}
div {
background:#ddd;
padding:20px;
}
footer {
background: #e4e8ec;
}
body {background:#e4e8ec;}
Upvotes: 3