Style flexWrap Property
Example
Allows the flexible items to wrap when necessary:
document.getElementById("main".style.flexWrap="wrap";
Try it »
Definition and Usage
The flexWrap property specifies whether the flexible items should wrap onto multiple lines or columns.
**Note:** The flexWrap property has no effect if the element is not a flexible item.
Browser support

Firefox, Opera and Chrome support the flexWrap property.
Syntax
Returns the flexWrap property:
object
.style.flexWrap
Sets the flexWrap property:
object
.style.flexWrap="nowrap|wrap|wrap-reverse|initial|inherit"
Attribute values
| Value | Description |
|---|---|
| nowrap | Default value. Specifies that the flexible items will not wrap. |
| wrap | Specifies that the flexible items will wrap onto multiple lines or columns when necessary. |
| wrap-reverse | Specifies that the flexible items will wrap when necessary, 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: | nowrap |
|---|---|
| Return Value: | A string that represents the flex-wrap property of an element. |
| CSS version | CSS3 |
Related Articles
CSS Reference Manual:flex-wrap Property
HTML DOM STYLE Reference Manual:flex Property
HTML DOM STYLE Reference Manual:flexBasis Property
HTML DOM STYLE Reference Manual:flexDirection Property
HTML DOM STYLE Reference Manual:flexFlow Property
HTML DOM STYLE Reference Manual:flexGrow Property
HTML DOM STYLE Reference Manual:flexShrink Property
The Style object