Flexbox: a game-changer but can be finicky sometimes.
If you're tired of wrestling with CSS to get that sticky footer right,
try this hack:no-js class on <html
> tag if JS is disabled.body, html {min-height:100%;}. container {display:flex;flex-direction:column;margin-top:auto /'' This pushes the content up ''/}. footer{padding:.5em}/'' When JavaScript isn't enabled or supported ''/. no-js. container{display:block! importantheight : auto! important ;min-height:100% ;}Just add this to your CSS and tweak as needed. Works like a charm without relying on JS.
Pro: Simple, no extra scripts.
_Cons: May cause layout issues in very old browsers
Use with caution!