- Home
- /
- Tutorials
- /
- CSS Tutorial
- /
- Flex Direction
CSS Flexbox
Flex Direction
The Flex Direction property is used to define the direction in which flex items are displayed inside a flex container.
By default, Flexbox arranges items horizontally from left to right. However, using flex-direction, you can change the layout to display items vertically, reverse their order, or create other arrangements. The supporting concepts are explained in Flex Container and Justify Content.
The flex-direction property only works on a flex container.
Syntax
Flex Direction Syntax
css
.container {
display: flex;
flex-direction: value;
}Flex Direction Example
