We use cookies to improve your experience. Learn more in our Privacy policy.
flex-direction
The flex-direction CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed).
Example
Initial value | row |
Applies to | flex containers |
Syntax
flex-direction: row;
Values
The flex container's main-axis is defined to be the same as the text direction. The main-start and main-end points are the same as the content direction.
Behaves the same as row but the main-start and main-end points are permuted.
The flex container's main-axis is the same as the block-axis. The main-start and main-end points are the same as the before and after points of the writing-mode.
Behaves the same as column but the main-start and main-end are permuted.
Browser support
flex-direction | 29 | 12 | 20 | 11 | 12.1 | 9 |