3 ms·
That'll still shrink/stretch the header/footer based on window size, which usually isn't what you want (headers and footers usually being a static height). Rea
by Izkata 7y ago
That'll still shrink/stretch the header/footer based on window size, which usually isn't what you want (headers and footers usually being a static height). Really, this layout flows from top to bottom, so my instinct wouldn't even be to use grid - just leave the divs as blocks and give them the appropriate height:
<div>
<div class='header'></div>
<div class='content'></div>
<div class='footer'></div>
</div>
.header { height: 30px; }
.footer { height: 20px; }
.content {
height: calc(100vh - 50px);
overflow: auto;
}
Bonus: If you have to support it still, this version works all the way down to IE9.