JSFiddle - React, Tailwind, and code Playground
HTML
<div class="column">
<div class="pane top">Top</div>
<div class="pane middle fill">
<h1>Middle</h1>
<p>Text</p>
<p>Text</p>
<p>Text</p>
<p>Text</p>
<p>Text</p>
<p>Text</p>
</div>
<div class="pane bottom">Bottom</div>
</div>
CSS
body, html {
height:100%;
margin:0;
padding:0;
}
div {
box-sizing:border-box;
box-sizing:content-box\9; /* Fix for IE9 sizing */
-moz-box-sizing:border-box; /* Fix for firefox sizing */
}
.column {
position:absolute;
width:100%;
min-height:100%;
height:auto;
overflow:hidden;
}
.pane {
position:absolute;
width:100%;
overflow:hidden;
}
.fill {
height:auto;
overflow:auto;
}
.top {
background:pink;
height: 20%;
top:0;
}
.middle {
background:red;
top:20%;
bottom:50px;
}
.bottom {
background:orange;
height: 50px;
bottom:0;
}
/* Fix for Safari scrollbars (also styles Chrome scrollbars) */
.fill::-webkit-scrollbar {-webkit-appearance: none;width: 10px;}
.fill::-webkit-scrollbar-track {background-color: rgba(0,0,0, .3);border-radius: 0px;}
.fill::-webkit-scrollbar-thumb {border-radius: 0px; background-color: rgba(255,255,255, .4);}