JSFiddle - React, Tailwind, and code Playground
HTML
<div class="wrapper">
<div class="header">
Some<br/>
Header
</div>
<div class="scroller">
First<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Content<br />
Last!<br />
</div>
<div class="footer">
Some<br/>
Footer
</div>
</div>
CSS
body{
height:100%;
}
.wrapper{
height:400px;
border-left:1px solid red;
position: relative;
overflow: hidden;
}
.header, .footer{
background-color: #EEE;
position:absolute;
width: 100%;
}
.footer {
bottom: 0;
}
.scroller{
position: absolute;
background-color: #CCC;
overflow:auto;
width: 100%;
}
JavaScript
$(document).ready(function(){
$('.scroller').css("top", $('.header').height());
$('.scroller').css("bottom", $('.footer').height());
});