Flex item
A flex item is a child of a flex container that participates in its flexible layout.
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.
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.
Also covered in
- Math for Web Design
- Vanilla WebIn early access (MEAP)
What to know first
- flex containerA flex container is an element whose children are laid out as flex items according to the CSS Flexible Box Layout model.
- flexboxFlexbox is a CSS one-dimensional layout model for arranging, sizing, aligning, and distributing items along a row or column.
- body elementThe HTML body element contains the content of a document intended for display in a browser.
- mainThe HTML main element identifies the dominant content of a document or application view, excluding shared navigation and peripheral content.
Related concepts
- flex containerpart of · A flex container is an element whose children are laid out as flex items according to the CSS Flexible Box Layout model.
- shrinkused by · Flex shrinking is the Flexbox behavior that reduces flex-item sizes and distributes insufficient space according to shrink factors and size constraints.
- flex-growused by · The CSS flex-grow property specifies a nonnegative factor determining a flex item’s proportional share of available free space.
- min-width propertyconfigured by · The CSS min-width property specifies the minimum permitted width of an element’s applicable box.
- orderconfigured by · The CSS order property specifies the visual ordering of flex or grid items within their container.
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.


