YouTip LogoYouTip

Prop Style Flexshrink

# Style flexShrink Property [![Image 8: Style Object Reference Manual](#) Style Object](#) ## Example Make the blue DIV element shrink to one-fifth of the other flexible items: document.getElementById("myBlueDiv".style.flexShrink = "5"; [Try it Yourself Β»](#) * * * ## Definition and Usage The flexShrink property specifies how much the item will shrink relative to the other flexible items in the same container. **Note:** If the element is not a flexible item, the flexShrink property has no effect. * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) Firefox, Opera, and Chrome support the flexShrink property. * * * ## Syntax Get the flexShrink property: _object_.style.flexShrink Set the flexShrink property: _object_.style.flexShrink="_number_|initial|inherit" ## Property Values | Value | Description | | --- | --- | | _number_ | A number that specifies how much the item will shrink relative to the other flexible items. The default value is 0. | | initial | Sets this property to its default value. See (#). | | inherit | Inherits this property from its parent element. See (#). | ## Technical Details | Default Value: | 1 | | --- | | Return Value: | A string, representing the flex-shrink property of the element. | | CSS Version | CSS3 | * * * ## Related Articles CSS Reference Manual: (#) HTML DOM STYLE Reference Manual: (#) HTML DOM STYLE Reference Manual: (#) HTML DOM STYLE Reference Manual: (#) HTML DOM STYLE Reference Manual: (#) HTML DOM STYLE Reference Manual: (#) HTML DOM STYLE Reference Manual: (#) * * Style Object](#)
← Prop Style FlexwrapProp Style Flexgrow β†’