I don't see the mention of flexbox here, so I will illustrate:
HTML
<div class="wrapper"> <div class="main">top</div> <div class="footer">bottom</div> </div>
CSS
.wrapper { display: flex; flex-direction: column; min-height: 100vh; } .main { flex: 1; } .footer { flex: 0; }
source share