CSS, Web, Web Development, Layout.
<main> area calculate according to the remaining space of the Grid container. .grid__container { display: grid; grid-template-rows: auto 1fr auto; } The effect is as follows: For more detailed information on this, please read: Building Classic Layouts with Flexbox: 10 Classic Web Layouts Building