Please visit this fiddle to see what I mean -
I have a parent DIV, within that there are two DIVs placed in vertical order. The top DIV should have only the height of its content, whereas the bottom DIV should occupy all remain space of the parent DIV irrespective to content heights, and also shouldn't overlap the parent DIV.
HTML:
<div class="outer">
<div class="inner-title">
THIS IS MY TITLE
</div>
<div class="inner-content">
CONTENT AREA
</div>
</div>
CSS:
html,body
{
height: 100%;
}
.outer
{
background-color:blue;
height: 80%;
}
.inner-title
{
background-color:red;
}
.inner-content
{
background-color:yellow;
height: auto;
}
In short, "inner-content" should occupy all remaining space of "outer" DIV, without overlapping.
Any idea of how to achieve this?
Any help on this much appreciated.