How can I achieve a full height page app with a div that takes up remaining height under banner and uses scroll for the remainder.
The middle div is the one I need to scroll, as shown in this fiddle.
html {
height: 100%;
}
body {
margin: 0px;
display: flex;
flex-direction: column;
}
.section {
display: flex;
}
.content {
background: gold;
overflow: scroll;
flex: 1;
}
.left {
background: tomato;
}
.right {
background: lightgreen;
}
<body>
<div>
header banner
</div>
<div class="section">
<div class="left">
should always fill remaining height (Works)
</div>
<div class="content">
main content: fills remaining space then overflows with scrollbar (doesnt work)<br> x
<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br> x
<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>
</div>
<div class="right">
should always fill remaining height (Works)
</div>
</div>
</body>
Much appreciated