JSFiddle - React, Tailwind, and code Playground
HTML
<div class="header">Header</div>
<div class="content">
<div class="wrap">
<div class="container">
<div class="article-1">
<div class="card">
<div class="card-text">
scrollable flex: 1 div<br>
1. scrollable<br>
2. scrollable<br>
3. scrollable<br>
4. etc...
</div>
</div>
</div>
<div class="article-2">
flex: none div
</div>
</div>
</div>
<div class="footer">Footer</div>
</div>
CSS
html, body{
height: 100%;
width: 100%;
padding: 0;
margin: 0;
box-sizing: border-box;
font-weight: bold;
}
.header {
position: absolute;
height: 40px;
background-color: grey;
z-index: 1;
width: 100%;
}
.content {
position: relative;
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
padding-top: 40px;
}
.wrap {
max-height: 100%;
width: 100%;
position: relative;
flex: 1;
display: flex;
flex-direction: column;
}
.container {
height: 100%;
width: 100%;
padding: 10px;
display: flex;
flex-direction: column;
}
.article-1 {
flex: 1;
min-height: 300px;
overflow: hidden;
}
.card {
height: 100%;
width: 100%;
overflow: auto;
}
.card-text {
height: 2000px;
width: 2000px;
background-color: red;
}
.article-2 {
flex: none;
height: 40px;
background-color: blue;
}
.footer {
position: relative;
height: 40px;
background-color: grey;
}