X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Style flexWrap Property

Style Object Reference Style Object

Example

Make the flexible items wrap if necesarry:

document.getElementById("main".style.flexWrap="wrap";

Try it yourself »


Definition and Usage

The flexWrap property specifies whether the flexible items should wrap or not.

Note: If the elements are not flexible items, the flexWrap property has no effect.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The flexWrap property is supported in Firefox, Opera, and Chrome.


Syntax

Return the flexWrap property:

object.style.flexWrap

Set the flexWrap property:

object.style.flexWrap="nowrap|wrap|wrap-reverse|initial|inherit"

Property Values

Value Description
nowrap Default value. Specifies that the flexible items will not wrap
wrap Specifies that the flexible items will wrap if necessary
wrap-reverse Specifies that the flexible items will wrap, if necessary, in reverse order
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit

Technical Details

Default Value: nowrap
Return Value: A String, representing the flex-wrap property of an element
CSS Version CSS3


Related Pages

CSS reference: flex-wrap property

HTML DOM STYLE Reference: flex property

HTML DOM STYLE Reference: flexBasis property

HTML DOM STYLE Reference: flexDirection property

HTML DOM STYLE Reference: flexFlow property

HTML DOM STYLE Reference: flexGrow property

HTML DOM STYLE Reference: flexShrink property


Style Object Reference Style Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook