I know, this kind of questions has been asked a lot, but somehow the correct answer is always eluding me...
Ok, I've got two things I want:
- A footer that's always on the bottom of the page, no matter if the content has less height than the available screen or more.
- The content above the footer should fill the rest of the screen - or use more space, if needed
The first part is quite easy, for example, here, with something like this...
.footer {
position: absolute;
bottom: 0;
left: 0;
}
No problem there. But how can I get the content above the .footer
element to fill the remaining space? height=100%;
obviously doesn't work;
Anyone got an idea how to realize a layout with...
- A fixed header
- A footer at the bottom of the screen (or below, if the content needs more height than that)
- A content that fills the available screen or uses more, if needed
(The reason is that in the end, I want a grid with flexible height that fills the screen in the content)