liveBook · Manning

Cross axis

The layout axis perpendicular to a flex container's main axis, along which items can be aligned.

How 3 Manning books explain it

CSS in Depth, Second Edition

The cross axis is the layout direction perpendicular to a flex container's main axis.

How it is used
Guides alignment decisions by identifying the direction perpendicular to a flex container’s item flow.
How deep it goes
Defines the axis, follows its rotation in a column layout, and distinguishes item alignment from spacing wrapped rows.
Examples
Uses a flex-container diagram and a nested column sidebar whose tiles grow vertically.
What you can do after
Operate/configure CSS flexbox alignment by choosing controls for items or wrapped rows after identifying the cross axis.

Read how CSS in Depth, Second Edition explains cross axis →

Web Design Playground, Second Edition

The cross axis is the direction perpendicular to the main axis in a flex container.

How it is used
Uses cross-axis alignment to position flex items and wrapped lines while building page layouts.
How deep it goes
Defines the perpendicular axis, relates it to flex-direction, and demonstrates alignment in a header layout.
Examples
Demonstrates a header logo and title centered on the vertical cross axis within a horizontal flex container.
What you can do after
Apply it via CSS Flexbox properties to align items across a container’s main direction.

Read how Web Design Playground, Second Edition explains cross axis →

Web Design Playground

The axis perpendicular to the main axis in a flex container along which items can be aligned.

How it is used
Guides how flex items are arranged across a flex container’s secondary direction.
How deep it goes
Defines the perpendicular axis and connects it to flex-direction and alignment choices.
Examples
Uses header and div flex containers plus row and column direction rules.
What you can do after
Operate/configure it by selecting cross-axis alignment with align-items in a flex container.

Read how Web Design Playground explains cross axis →

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.