CSS flex-direction property
The flex-direction property specifies the direction and axis of the flex items (children elements) inside a flexible container or flexbox.
Syntax
flex-direction: row|row-reverse|column|column-reverse|initial|inherit;
Default value: row
Implementation
We make the container a Flexbox by setting display: flex. We then use flex-direction: column to set the axis to be vertical.
Try experimenting with different values like
row,row-reverse, andcolumn-reverseforflex-direction.
Free Resources
Copyright ©2026 Educative, Inc. All rights reserved