flex-basis

The flex-basis CSS property sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with box-sizing.

Example

Initial value auto
Applies to flex items, including in-flow pseudo-elements

Syntax

  
flex-basis: 100px;
  

Values

An absolute , a of the parent flex container's main size property, or the keyword auto. Negative values are invalid. Defaults to auto.
Indicates automatic sizing, based on the flex item’s content.

Browser support

flex-basis2912221112.19
auto2212181112.19
content1261
max-content66
min-content66

We use cookies to improve your experience. Learn more in our Privacy policy.

×