-ms-flex property

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
0 out of 2 rated this helpful - Rate this topic

Gets or sets values that specify the parameters of a flexible length: the positive and negative flexibility, and the preferred size.

This property is read/write.

Flexible Box Layout Module, Section 7Internet Explorer 10

Syntax

-ms-flex: [ [ <positive-flex> <negative-flex> ? ] || <preferred-size> ] | none

Property values

positive-flex

An integer that sets the positive flexibility.

If omitted, the element's positive flexibility is "1".

A negative value is not valid.

negative-flex

An integer that sets the negative flexibility.

If omitted, the element's negative flexibility is "0".

A negative value is not valid.

preferred-size

Sets the preferred size of the flexbox item. Can be any valid value for the width or height properties, excluding "inherit".

If omitted, the preferred size defaults to "0px".

If the preferred-size component is auto on a child of a flexbox, the preferred size is the value of the flexbox item's width or height property (whichever is parallel to the main axis).

none

Initial value. Equivalent to setting -ms-flex to "0 0 auto".

CSS information

Applies Toflexbox items
Mediavisual
Inheritedno
Initial Valuenone

Standards information

Remarks

This property makes flexbox items "flex"—adjusting their width or height to fill the available space. A flexbox distributes free space to its items proportional to their positive flexibility, or shrinks them to prevent overflow proportional to their negative flexibility.

When the element containing the -ms-flex property is a flexbox item, the -ms-flex property is consulted instead of the width or height properties to determine the main size of the element. (If an element is not a flexbox item, the -ms-flex property has no effect.)

See also

CSSStyleDeclaration

 

 

Send comments about this topic to Microsoft

Build date: 11/29/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

© 2013 Microsoft. All rights reserved.