Div at bottom of window and adaptable height div
- by Rob
Is there a way to get a div to always be at the bottom of the window, and another div to change its height to fill any space that it leaves, and that div will scroll if its content is too long. (I never want the window to scroll).
This is best illustrated by a picture:
The green div will always put itself at the bottom of the window, and the orange div will fill the gap. When the window is smaller, like in the right hand image, the orange div will be smaller and will scroll.
The green div can be toggled. Sometimes the green div will have display: none, and then the orange div will stretch to the bottom. When the green div has display: block again, it will look like the picture again.
It has to work in IE6.
So far I can get the green div to go to the bottom by:
position: absolute;
bottom: 0;
But I don't know how to get the orange div to do what I want.