Coding task · HTML and CSS course · Module 8: CSS Grid

Nested CSS Grids

Nested grids are grids inside grids - like rooms within rooms in a pyramid! A grid child element can itself be a grid container with its own layout.

Task

Create a layout with an outer 2x2 grid, where each cell contains an inner grid with its own columns. Outer grid: .pyramid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px }. Inner grid: .chamber { display: grid; grid-template-columns: 1fr 1fr; gap: 10px }.