First of all, I'm NOT Looking for Javascript Solutions.
I'd also prefer solutions NOT to use CSS3. If possible (This is for support)
This can be done horizontally. As shown at xHTML/CSS: How to make inner div get 100% width minus another div width
I want to know if something similar can be achieved vertically.
I am aware that CSS3 solutions may be able to be fabricated using the calc(); operator. However I'm looking for a more old school pre-CSS3 solution, so I can get as much support as possible.
Say there is a parent container who's dimensions are set by the user via resizing.
There are two inner divs, one above the other.
- one is as high as its content
- one fills the rest of the height and scrolls if overflows.
The scrolling container is above the growing container.
Here it is, explained a bit simpler:
<div id="parent">
<div id="scroll">
content<br/>content<br/>content<br/>content<br/>content<br/>
content<br/>content<br/>content<br/>content<br/>content<br/>
content<br/>content<br/>content<br/>content<br/>content<br/>
content<br/>content<br/>content<br/>content<br/>content<br/>
content<br/>content<br/>content<br/>content<br/>content
</div>
<div id="grow">
as this content grows,
the above content above gets smaller,
but is scrollable,
</div>
</div>
#parent{
height : user defined in pixels / can randomly change
width : user defined in pixels / can randomly change
}
#grow{
width : as wide as parent
height : as_height_as_contents
}
#scroll{
width : as wide as parent
height : whatever height is remaining
overflow : auto /* scroll if necessary */
}
So is this possible?