The Problem
On 'short' pages without much content, your footer rides up too high. I know. Embarassing, huh? This of course is not a new problem, but in the old-days before flexbox, we had to resort to using hacks or JavaScript to make our footers sticky. What a mess. Not any more.
The Fix
To use, make the body element the Flex Container and then add a flex-grow property to the main content area. No matter the content size, the div expands to take up any leftover space. See the commments in the CSS for more information.
Resources
This pen was inspired by a number of articles inlcuding this one by Phillip Walton .
The image above was taken last year on my space vacation. I wish! No really, the hero image is a NASA photo I yanked from the wonderful free stock photo site, Unsplash .