JSFiddle - React, Tailwind, and code Playground
HTML
<div class="page-wrap">Content!</div>
<footer class="site-footer">I'm the Sticky Footer.</footer>
CSS
* {
margin: 0;
}
html, body {
height: 100%;
}
.page-wrap {
min-height: 100%;
/* equal to footer height */
margin-bottom: -142px;
}
.page-wrap:after {
content:"";
display: block;
}
.site-footer, .page-wrap:after {
/* .push must be the same height as footer */
height: 141px;
}
.site-footer {
border-top: 1px solid #666;
background: #eeeeee;
}