JSFiddle - React, Tailwind, and code Playground
HTML
<article>
<header>header
</header>
<section>
section
</section>
<footer>
footer
</footer>
</article>
CSS
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html, body {
height: 100%;
}
article {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
min-height: 100vh;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
}
header {
background-color: black;
height: 50px;
}
section {
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
-ms-flex-positive: 1;
flex-grow: 1;
}
footer {
background-color: gray;
height: 30px;
}