css/flex-fill-vertical.html
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>Flex height 100%</title>
<style>
html, body {
height: 100%;
padding: 0;
margin: 0;
}
.container {
height: 100%;
display: flex;
flex-direction: column;
}
.box-1 {
background-color: green;
height: 60px;
flex: 0 0 auto;
}
.box-2 {
background-color: blue;
flex: 1 1 auto;
overflow-y: auto;
}
#next {
height: 100%;
}
</style>
</head>
<body>
<div id="next">
<div class="container">
<div class="box box-1"></div>
<div class="box box-2">
x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>
x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>
x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>
x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>
x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>
x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>
x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>
x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>
</div>
</div>
</div>
</body>
</html>