Adding <code>flex:1</code> to <code>&lt;main&gt;</code> will force it to take the remaining space
html {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
header {
  height: 60px;
  background: #ccc;
main {
footer {
  height: 60px;
  background: #ccc;

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.