Is there a way of making a DIV expand to fill the space left in it's parent container without having to use Javascript to calculate the necessary heights?
<div class="parent" style="height: 100%">
<div class="child-top">
</div>
<div class="child-bottom" style="position: relative;">
</div>
</div>
.parent is a sidebar that takes up the whole screen, .child-top height may vary depending on the content, and I would like .child-bottom to just take up the rest of the space with position relative so that I can correctly position other elements inside.
UPDATE: I can't use fixed heights in any of the elements. .child-top for obvious reasons, and .child-bottom will have an element with a scrollbar when its height outgrows the parent.
parent's background to match thechild-bottom's background. What they don't know won't hurt them..child-bottomwill have a scrollbar when elements inside outgrow it's height. =\