Footer stays at the bottom V.3
by davidxmartins
HTML
<div class="content"></div>
<div class="header"></div>
<div class="footer"></div>
<div class="container">
<div class="content">
<!-- Content here -->
</div>
<div class="footer">
<div>Your footer content here</div>
</div>
</div>
CSS
html, body {
margin: 0;
padding: 0;
}
.header {
height: 50px;
background: black;
}
.container {
display: flex;
flex-direction: column;
min-height: calc(100vh - 50px);
}
.content {
flex: 1;
}
.footer {
background: grey;
flex-shrink: 0;
}