Easy Tutorial
❮ Dom Obj Datetime Jsref Pi ❯

flexShrink Property

Style Object

Example

Shrink the blue DIV element to one-fifth of the other flexible items:


Definition and Usage

The flexShrink property specifies how much the item will shrink relative to the rest of the flexible items inside the same container.

Note: The flexShrink property has no effect if the element is not a flexible item.


Browser Support

Firefox, Opera, and Chrome support the flexShrink property.


Syntax

Return the flexShrink property:

Set the flexShrink property:

Property Values

Value Description
number A number specifying how much the item will shrink relative to the rest of the flexible items. The default value is 0.
initial Sets this property to its default value. See initial
inherit Inherits this property from its parent element. See inherit

Technical Details

Default value: 1
Return value: String, representing the flex-shrink property of the element.
--- ---
CSS Version CSS3
--- ---

Related Articles

CSS Reference: flex-shrink 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: flexWrap Property


Style Object

❮ Dom Obj Datetime Jsref Pi ❯