I have a fixed-height (180px) header and fixed-height footer (50px). I’d like the container height to be: window height MINUS header MINUS footer.
How do I achieve this using jQuery?
Edited to Add: If the container height is updated on window resize, that’d be awesome!
No need to use jquery.
With css (i marked the key points to get it working, you can change the values accordingly):
Results in something like:
This emulates old frames. In this example, there is a little span of 3px between each
div.EDIT2:
If you use some other absolute positioned divs (like tooltips), you have to add this condition to avoid a strange flickering in IE7:
EDIT3: seems like I didn’t paste the whole thing. This bit is essential to get it working with IE6. Please note this is not one of the usual expression’s hacks.
Read here for more infos.