The most flexible solution is to use CSS display:table
- the benefit of this is it also works with unknown heights, if the height of your menu changed for example.
HTML
<div class='table'>
<div class='row'>
<div class='cell'>head: div 1, fixed height.</div>
</div>
<div class='row'>
<div class='cell'>
<div id="list">
<div class="item">Some Dynamic Item</div>
<div class="item">Some Dynamic Item</div>
<div class="item">Some Dynamic Item</div>
<div class="item">Some Dynamic Item</div>
<div class="item">Some Dynamic Item</div>
<div class="item">Some Dynamic Item</div>
<div class="item">Some Dynamic Item</div>
<div class="item">Some Dynamic Item</div>
<div class="item">Some Dynamic Item</div>
<div class="item">Some Dynamic Item</div>
<div class="item">Some Dynamic Item</div>
</div>
</div>
</div>
</div>
CSS
html, body {
height:100%;
width:100%;
margin:0;
padding:0;
}
.table {
display:table;
table-layout:fixed;
height:100%;
width:100%;
max-height:100%;
}
.row {
display:table-row;
}
.cell {
display:table-cell;
}
.row:first-of-type >.cell {
color: #EEE;
background-color:#222;
height:45px; /* doesnt matter what this is- the layout will flexibly adjust */
}
.row:last-of-type >.cell {
color: #222;
background-color:#DDD;
}
#list {
height:100%;
overflow-y:auto;
}