I need to somehow create a div
that somehow is scrollable and fills the remaining space of it's parent (parent has a fixed height, everything else is dynamic).
The problem is that the heights are dynamic (except for the main parent), it should be compatible with IE (at least 7 or 8) and I can't use Javascript
Does anyone have even the slightest idea how is this achievable ?
Here's a fiddle that represents my layout: https://jsfiddle.net/dsyh8xtv/16/
*I need the orange div to fill the remaining height and be scrollable
.parent {
display: table;
height: calc(100vh - 50px);
background-color: white;
border: 1px solid #eee;
}
.child {
display: table-cell;
height: 100%;
}
.child:nth-child(1) {
background-color: blue;
color: #fff;
}
.child:nth-child(2) {
background-color: yellow;
}
.sub-parent {
display: block;
background-color: pink;
height: 100%;
}
.sub-child {
width: 100%;
float: left
}
.sub-child:nth-child(1) {
background-color: red;
color: #fff;
}
.sub-child:nth-child(2) {
background-color: orange;
overflow-y: scroll;
}
<div class="parent">
<div class="child">
regular child
</div>
<div class="child">
<div class="sub-parent">
<div class="sub-child">
this one has a dynamic height
</div>
<div class="sub-child">
this one should fill the remaining height and be scrollable
</div>
</div>
</div>
</div>