Variable height header with scrollable content area filling remaining viewport area
Posted
by Neutrino
on Stack Overflow
See other posts from Stack Overflow
or by Neutrino
Published on 2010-04-30T16:49:52Z
Indexed on
2010/05/01
14:17 UTC
Read the original article
Hit count: 350
I've seen versions of this simple problem raised a dozen times here and elsewhere on the web, but I haven't seen a solution that works for me yet so I'm asking it again.
I want a webpage with a variable height full width header (height based on contents). Below that I want a content area that fills the rest of the browser viewport. If the content is larger than the remaining space in the viewport then I want the content area to scroll.
I don't need this to work on IE6. I don't care whether the solution uses CSS, tables or a mixture of the two, just no frames and no Javascript.
For a bonus point fix a variable height footer to the bottom of the page.
© Stack Overflow or respective owner