HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

flex-direction

Description

The flex-direction property for CSS specifies how flex items are placed in the flex container by setting the direction of the flex container's main axis.

Syntax

CSS

flex-direction: value;

JS

object.style.flexDirection = "value";

Values

<'flex-direction'> = column | column-reverse | row | row-reverse

Specifies how flex items are placed in the flex container by setting the direction of the flex container's main axis.

column

The flex container's main axis has the same orientation as the block axis of the current writing mode.

column-reverse

The same as column except the main-start and main-end directions are swapped.

row

The flex container's main axis has the same orientation as the inline axis of the current writing mode.

row-reverse

The same as row except the main-start and main-end directions are swapped.

Initial

row

Examples

1 · column

2 · column-reverse

3 · row

4 · row-reverse

5 · JS