YouTip LogoYouTip

Prop Style Flexdirection

HTML DOM Style flexDirection Property

HTML DOM Style flexDirection Property

Definition and Usage

The flexDirection property sets or returns the direction of the flexible items.

Note: If the element is not a flexible item, the flexDirection property has no effect.

Browser Support

Firefox, Opera, and Chrome support the flexDirection property.

Syntax

Return the flexDirection property:

object.style.flexDirection

Set the flexDirection property:

object.style.flexDirection="row|row-reverse|column|column-reverse|initial|inherit"

Property Values

Value Description
row Default value. The flexible items will display horizontally, just like a row.
row-reverse Same as row, but in reverse order.
column The flexible items will display vertically, just like a column.
column-reverse Same as column, but in reverse order.
initial Sets this property to its default value. See initial.
inherit Inherits this property from its parent element. See inherit.

Technical Details

Default Value: row
Return Value: A string, representing the flex-direction property of the element.
CSS Version: CSS3

Related Articles

← Prop Style FlexflowProp Style Flexbasis β†’