A small page shell uses CSS Grid rows so the header and footer keep their size while main content takes the leftover space.

Program

Grid rows can make a page frame without JavaScript: header first, main content in the flexible middle, footer last.

page_shell_rows.html
Visuals: captured from real browser rendering
<style>
.page { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
header, main, footer { padding: 16px; }
main { background: #f8fafc; }
</style>
<div class="page">
  <header>Store status</header>
  <main id="content">Orders are ready to review.</main>
  <footer>Need help?</footer>
</div>
  1. Create the page wrapper.

    A page wrapper contains header, main, and footer regions.
    The wrapper gives the three page regions one layout container.
  2. Give the shell viewport height.

    The page shell expands to at least the viewport height.
    min-height gives the footer room to sit at the bottom of short pages.
  3. Turn the shell into a grid.

    The wrapper becomes a grid container for the three page regions.
    display grid lets the shell define vertical tracks.
  4. Define header, main, and footer rows.

    The header and footer keep natural height while main takes the middle row.
    auto 1fr auto keeps the middle region flexible.
  5. Place main content in the flexible row.

    The main region fills the middle space between header and footer.
    The 1fr row gives main the leftover height.
grid rows grid-template-rows describes the vertical tracks in a grid container.
flexible middle 1fr gives the main area the remaining height after the header and footer take what they need.