What is Flexbox?

DefinitionFlexbox, short for the CSS Flexible Box Layout module, is a one-dimensional CSS layout method that arranges items in a row or a column and distributes space, alignment and sizing among them.

Also known as CSS Flexible Box Layout

An element becomes a flex container when its display property is set to flex, and its direct children become flex items. Properties on the container, such as flex-direction, justify-content, align-items, flex-wrap and gap, control the direction, spacing and alignment of the items, while the flex property on each item controls how it grows or shrinks to fill the available space.

Flexbox made common patterns that once required floats and hacks, such as vertically centered content, equal-height columns and navigation bars, simple to build, and all modern browsers support it. It works best for arranging items along one axis, while CSS grid layout is designed for two-dimensional layouts with rows and columns. Reordering content visually with Flexbox needs care, because screen readers and keyboard users follow the order of the HTML source.

Flexbox resources

Compare: CSS grid layout vs. Flexbox

Topic: Web development

Cite this definition
APA

What is Flexbox? (2026, November 22). Glossary. https://glossary.io/flexbox/

MLA

“What Is Flexbox?” Glossary, Coywolf, 22 Nov. 2026, glossary.io/flexbox/.

Chicago

“What Is Flexbox?” Glossary. Coywolf. November 22, 2026. https://glossary.io/flexbox/.

HTML link
<a href="https://glossary.io/flexbox/">What is Flexbox?</a>

Published