Search within TutorialsPark

CSS3 flex-basis Property


To set the initial main size of the flex-item


Definition and Notes.

1. The CSS3 flex-basis property is a shorthand to set flex-grow, flex-shrink and flex-basis in a single declaration

2. The W3C specification strongly recommends that the shorthand should be used instead of the individual properties because it resets unspecified component correctly


Syntax:

CSS3 flex-basis property. internetexplorer safari firefox opera chrome

View in Splitscreen»

Code-Editor:



Property Values

Value Description
auto The value is same as the size of the flex item, its the default value
initial The default value is applied, default value is auto.
length To set the value using length values
percentage To set the value using percentage values

Specifications

Specs Value
Name flex-basis
Value auto | <width>
Initial Value auto
Applies to flex items
Javascript syntax object.style.flexBasis="10px"
Inherited No
Computed Value as specified, with lengths made absolute.
Browser Support internetexplorer safari firefox opera chrome

Related Examples.