CSS · Layout

flex-direction

Sets the main axis: row, row-reverse, column or column-reverse.

Syntax
flex-direction: row | column

Example

Try it

More in this group

align-content align-items align-self clear display flex flex-basis flex-grow

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course