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
- CSS Reference: flex-direction property
- HTML DOM STYLE Reference: flex property
- HTML DOM STYLE Reference: flexBasis property
- HTML DOM STYLE Reference: flexFlow property
- HTML DOM STYLE Reference: flexGrow property
- HTML DOM STYLE Reference: flexShrink property
YouTip