liveBook · Manning

Grid container

A grid container is an element whose display mode establishes a CSS Grid formatting context for laying out its child elements as grid items.

How 2 Manning books explain it

CSS in Depth, Second Edition

A grid container is an element whose display mode establishes a CSS Grid formatting context for its child elements.

How it is used
Uses a grid container to arrange direct children in page layouts, portfolios, cards, and responsive columns.
How deep it goes
Develops templates, implicit tracks, alignment, and nested subgrid through rendered layouts rather than browser internals.
Examples
Builds a six-box grid, a main-and-sidebar page, an expanding photo portfolio, and responsive three-column content.
What you can do after
Build it from scratch: define a grid container, size its tracks, and let additional items create rows when needed.

Read how CSS in Depth, Second Edition explains grid container →

Web Design Playground, Second Edition

A grid container is an element whose child elements are laid out according to CSS Grid rules.

How it is used
Organizes child elements horizontally and vertically as the foundation for full page layouts.
How deep it goes
Defines container conversion and automatic items, then develops sizing, placement, gaps, areas, and alignment.
Examples
Demonstrates a div and body converted with display: grid, plus a three-column body that centers portfolio content.
What you can do after
Apply it via CSS Grid to convert a parent element and control its child layout with tracks and alignment.

Read how Web Design Playground, Second Edition explains grid container →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.