HTML
<div class="container">
<div class="header">
<span>
<span>First</span>
</span>
<span>
<span>Second</span>
</span>
<span class="active">
<span>Thrid</span>
</span>
</div>
<div class="body">
<div class="Control1">
Content!
</div>
</div>
</div>
CSS
.container
{
height: 300px;
border: black 1px solid;
}
.container > .header
{
background: grey;
}
.container > .header > span
{
display: inline-block;
padding: 10px;
}
.container > .header > .active
{
background: black;
color: white;
}
.container > .body
{
height: 100%;
overflow: auto;
background: lightgrey;
}
My problem here is that i have the container div thats 300 px in height, and then i have the header thats of unknown height (depending on number of items on it and the screen size it could be more than one row.) how do i make the .body take up the rest of the space and show a scroll if it has more content than there is space for??
my first idea was to fiddle with absolute positioning but that didn't work when i had more than one row of .header items..
I can't change the html as that is generated by a third party component (well i could but it would be a lot of work) and i would rather avoid using javascript if i can..