JSFiddle - React, Tailwind, and code Playground
by Aleh Krutsikau
HTML
<div class="my-flex-container">
<div class="my-flex-block b1">
<h1>Item 1</h1>
<p>Ku</p>
</div>
<div class="my-flex-block b2">item2</div>
<div class="my-flex-block b3">
<div>item3.1</div>
<div>item3.2</div>
<div>item3.3</div>
<div>item3.4</div>
<div>item3.5</div>
<div>item3.6</div>
<div>item3.7</div>
<div>item3.8</div>
<div>item3.9</div>
<div>item3.1</div>
</div>
</div>
CSS
html {
height: 100%;
}
body {
margin:0;
padding:0;
height:100%;
}
.my-flex-container{
display: flex;
width : 100%;
height: 100%;
border: 1px solid #000;
flex-direction: column;
box-sizing: border-box;
overflow: hidden;
}
.b1 {
background-color: #ccc;
flex-shrink: 0;
}
.b2 {
background-color: #bbb;
flex-shrink: 0;
}
.b3 {
background-color: #aaa;
flex-grow: 1;
overflow-y: auto;
}