JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<div class="head">
This is a header.
</div>
<div class="content">
This is some content.<br/>
This is some content.<br/>
This is some content.<br/>
This is some content.<br/>
This is some content.<br/>
This is some content.<br/>
This is some content.<br/>
This is some content.<br/>
This is some content.<br/>
This is some content.<br/>
This is some content.<br/>
This is some content.<br/>
This is some content.<br/>
This is some content.<br/>
This is some content.<br/>
This is some content.<br/>
</div>
<div class="foot">
This is a footer.
</div>
</div>
CSS
html, body {
width: 100%;
height: 100%;
}
body {
display: flex;
margin: 0;
padding: 0;
}
.container {
display: flex;
flex: auto;
flex-direction: column;
height: 100%;
}
.head {
background: #ccf;
}
.content {
overflow-y: auto;
background: #ffc;
}
.foot {
background: #cfc;
}