body {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100vh;
  font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
  text-align: center;
  font-size: 5vw;
}
header, nav, main {
  flex: 1 1 0%;
}
footer {
  flex: 0 1 0%;
  margin-bottom: 1px;
}
body, footer{
  background-color: blue;
}
header {
  background-color: yellow;
}
nav {
  background-color: red;
}
main {
  background-color: green;
}