Make it simple : DEMO
section {_x000D_
display: flex;_x000D_
flex-flow: column;_x000D_
height: 300px;_x000D_
}_x000D_
_x000D_
header {_x000D_
background: tomato;_x000D_
/* no flex rules, it will grow */_x000D_
}_x000D_
_x000D_
div {_x000D_
flex: 1; /* 1 and it will fill whole space left if no flex value are set to other children*/_x000D_
background: gold;_x000D_
overflow: auto;_x000D_
}_x000D_
_x000D_
footer {_x000D_
background: lightgreen;_x000D_
min-height: 60px; /* min-height has its purpose :) , unless you meant height*/_x000D_
}
_x000D_
<section>_x000D_
<header>_x000D_
header: sized to content_x000D_
<br/>(but is it really?)_x000D_
</header>_x000D_
<div>_x000D_
main content: fills remaining space<br> x_x000D_
<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>_x000D_
<!-- uncomment to see it break -->_x000D_
x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br> x_x000D_
<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br> x_x000D_
<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br> x_x000D_
<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>_x000D_
<!-- -->_x000D_
</div>_x000D_
<footer>_x000D_
footer: fixed height in px_x000D_
</footer>_x000D_
</section>
_x000D_
Full screen version
section {_x000D_
display: flex;_x000D_
flex-flow: column;_x000D_
height: 100vh;_x000D_
}_x000D_
_x000D_
header {_x000D_
background: tomato;_x000D_
/* no flex rules, it will grow */_x000D_
}_x000D_
_x000D_
div {_x000D_
flex: 1;_x000D_
/* 1 and it will fill whole space left if no flex value are set to other children*/_x000D_
background: gold;_x000D_
overflow: auto;_x000D_
}_x000D_
_x000D_
footer {_x000D_
background: lightgreen;_x000D_
min-height: 60px;_x000D_
/* min-height has its purpose :) , unless you meant height*/_x000D_
}_x000D_
_x000D_
body {_x000D_
margin: 0;_x000D_
}
_x000D_
<section>_x000D_
<header>_x000D_
header: sized to content_x000D_
<br/>(but is it really?)_x000D_
</header>_x000D_
<div>_x000D_
main content: fills remaining space<br> x_x000D_
<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>_x000D_
<!-- uncomment to see it break -->_x000D_
x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br> x_x000D_
<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br> x_x000D_
<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br> x_x000D_
<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>_x000D_
<!-- -->_x000D_
</div>_x000D_
<footer>_x000D_
footer: fixed height in px_x000D_
</footer>_x000D_
</section>
_x000D_