flex-direction
The flexbox property that sets the main axis: row (the default) lays items out horizontally, column vertically.
In more detail
row-reverse and column-reverse flip the visual order but not the order used by the keyboard and screen readers. Switching to column swaps what justify-content and align-items do, because they follow the axes rather than fixed directions.
Related terms
- main axis — The direction flex items are laid out in, horizontal for flex-direction: row and vertical for column.
- Flexbox — A CSS layout mode that arranges a container's children in a row or column and distributes space between them.
Taught in
- Deep Flexbox: Flex Grow, Shrink, Basis And Alignment Physics — Frontend Architecture & Web Platform
- CSS Subgrid: Inheriting Track Sizing Across Nested Layouts — Frontend Architecture & Web Platform