JSFiddle - React, Tailwind, and code Playground

by jmaxwell21

HTML

<header>The header content goes here.</header>
<div class="content">The main content goes here.</div>
<footer>The footer content goes here.</footer>

CSS

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
}
.content {
  flex: 1;     /* this is the key; consumes all available height */
  background: blue;
  display: flex;
  align-items: center;
  justify-content: center;  
  font-size: 30px;
}
header {
  height: 64px;
  background: red;
  display: flex;
  align-items: center;
  justify-content: center;
}
footer {
  height: 64px;
  background: green;
  display: flex;
  align-items: center;
  justify-content: center;
}
* {
  margin: 0;
  color: #fff;
}