JSFiddle - React, Tailwind, and code Playground
HTML
<header>header</header>
<section>content</section>
<footer>footer</footer>
CSS
html {
height: 100%;
margin: 0px;
padding: 0px;
}
body {
position: relative;
height: 100%;
padding: 100px 0px;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
body > header, body > section, body > footer {
display: block;
width: 100%;
}
body > header, body > footer {
position: absolute;
height: 100px;
background-color: green;
}
body > header { top: 0px }
footer { bottom: 0px }
section {
height: 100%;
background-color: red;
}