<div id="wrap">
<div id="head">
<span>head</span>
</div>
<div id="body">
<span>body</span>
</div>
<div id="foot">
<span>foot</span>
</div>
</div>
html,
body {
padding: 0;
margin: 0;
background-color: #fff;
font-family: monospace;
font-size: 18px;
line-height: 1.4;
color: #fff;
}
* {
box-sizing: border-box;
}
#wrap {
display: flex;
flex-direction: column;
min-height: 100vh;
}
#head, #foot {
flex: 0 0 auto;
height: 100px;
background-color: #000;
padding: 10px;
}
#body {
flex: 1 1 100%;
background-color: #777;
padding: 10px;
}
View Compiled
This Pen doesn't use any external CSS resources.