CSS flex-direction Property Explained

What the CSS flex-direction property does, with an example.

Published November 3, 2026

The CSS flex-direction property sets the direction flex items are laid out in a flex container — row, column, or their reverse.

Key points

  • Check browser compatibility on a resource like caniuse.com if targeting older browsers

Example

flex-direction: column;
More CSS articles