I have a setup that requires a header div and a footer div to stay rooted at the top and bottom of the page respectively, while the content div in the middle fills up the area in between. The content div is set to overflow:auto; so a scroll bar appears when content volume is large enough. Something like this:
+----------------------------------------------+ <-
|header div with fixed height of 90px | |
+----------------------------------------------+ |
|content div with variable height || |
| || <-scroll bar |
| || (if required) |
| || |- total window height
| || |
+----------------------------------------------+ |
|footer div with fixed height of 60px | |
+----------------------------------------------+ <-
I want the content div alone to change its height in a way that the combination of the three fill the whole window. Is it possible to do it with CSS alone? Thanks.
(Currently the header and footer divs have position:fixed; and content has height:100%; but it looks hideous.)