<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

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js