.page { display: grid; min-height: 100vh; grid-template-rows: auto 1fr auto; }The middle content can fill the space between header and footer.
LESSON 67 OF 100
Keep header and footer content-sized while the middle area stays flexible.
grid-template-rows defines explicit rows. auto 1fr auto lets the first and last rows respond to content while the middle row receives remaining space in a container with available height.
.page { display: grid; min-height: 100vh; grid-template-rows: auto 1fr auto; }The middle content can fill the space between header and footer.
.page { display: grid; grid-template-rows: 1fr 1fr 1fr; }Three 1fr values split height equally and can make header and footer unnecessarily large.
Enable Grid, set min-height: 100vh and rows auto 1fr auto.
The minimum height provides distributable space, and the middle 1fr track receives it after the auto rows are sized.
ANALYSIS REQUEST
The initial discussion is without obligation. You receive an honest recommendation, suitable stages and the factors that affect price.