Web4College

CSS flex-basis property

src

Description

CSS flex-basis property behaves the same way as width of a box except it only specifies the width of content-box of flex item.

Syntax

flex-basis : auto | +ve integer

Property values

autoDefault

The width of content-box is resolved to fit the content completely.

flex-basis: auto;
Try it

+ve integer

100

It specifies the width of the content-box of the flex item. Remember that this value does not include border-box and padding area.

flex-basis: 100px;
Try it

Applicable to

It applies to flex items.