JSFiddle - React, Tailwind, and code Playground
HTML
<section>
<header>header</header>
<article>
Long <br>
Long <br>
Long <br>
Long <br>
Long <br>
Long <br>
Long <br>
Long <br>
Long <br>
Long <br>
Long <br>
Long <br>
Long <br>
Long <br>
</article>
<footer>footer</footer>
</section>
CSS
section {
display: flex;
flex-direction: column;
max-height: 200px;
width: 300px;
border: 2px dashed red;
}
header, footer {
height: 50px;
flex-basis: auto;
flex-grow: 0;
flex-shrink: 0;
background: steelblue;
}
article {
min-height: 0px;
flex-grow: 1;
flex-shrink: 1;
flex-basis: auto;
overflow: auto;
}