liveBook · Manning

Flex item

A flex item is a child of a flex container that participates in its flexible layout.

How 3 Manning books explain it

Web Design Playground, Second Edition

A flex item is a child element of a flex container that participates in flexible sizing and alignment along the container’s axes.

How it is used
Uses flex items as the children arranged and sized within one-dimensional Flexbox components and small page layouts.
How deep it goes
Defines automatic item creation, then explains growth with proportions and introduces shrinkage, basis, ordering, alignment, and shorthand.
Examples
Shows a heading centered in a browser window and a two-column article-and-sidebar layout with proportional growth.
What you can do after
Build it from scratch: center a flex item or arrange and proportion two columns using CSS Flexbox.

Read how Web Design Playground, Second Edition explains flex item →

CSS in Depth, Second Edition

A flex item is a child of a flex container that participates in flexible one-dimensional layout.

How it is used
Arranges direct children within a flex container for menus, columns, nested tiles, and aligned text.
How deep it goes
Explains item sizing through basis, growth, and shrinkage, then applies alignment and ordering; defers some controls to a reference-style overview.
Examples
Uses a spaced navigation menu, unequal-content columns with nested tiles, and a three-part price display.
What you can do after
Build it from scratch: identify direct children as items, size and space them, and nest containers when inner tiles must fill a column.

Read how CSS in Depth, Second Edition explains flex item →

Web Design Playground

A child element participating in a flex formatting context, whose size and position are controlled by flexbox properties.

How it is used
Positions and sizes child elements in flex containers for navigation, content columns, centering, and footers.
How deep it goes
Defines automatic flex-item creation and explains growth proportions, then introduces shrinking, initial size, order, and individual alignment.
Examples
Uses a centered heading, article-and-sidebar columns, and a footer whose copyright notice and links are separate flex items.
What you can do after
Build it from scratch with CSS flexbox to arrange and resize items in small page layouts.

Read how Web Design Playground explains flex item →

Also covered in

What to know first

Related concepts

Questions about flex item

What is flex item?

A flex item is a child of a flex container that participates in its flexible layout.

Which Manning books explain flex item?

Web Design Playground, Second Edition, CSS in Depth, Second Edition and Web Design Playground.

What should I know before learning flex item?

Manning books that teach flex item usually introduce flex container, flexbox, body element and main first.

What is flex item part of?

Flex item is part of flex container. A flex container is an element whose children are laid out as flex items according to the CSS Flexible Box Layout model.

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.