I'm trying to make a stacked layout using flexbox. Ideally it'd look like this:
where the bottom (blue) div is a fixed height of 250px
and the top div is n-250
, where n
is the size of the parent container--in another words, the top should stretch to fill the container.
I have some idea of how to do this when I have the container height, but I'd rather avoid having to determine that variable at runtime.
This issue has been covered at length in various forms , but none seem to address this simple use-case (here, for example, works with a header/content/footer, but ostensibly not with just content/footer).
I've set up a codepen with the example.