Contents
What is CSS flex basis?
The CSS flex-basis
property only applies to flex items. By using it, you can set the initial length for flex items:
Example
a:nth-of-type(3) {
-webkit-flex-basis: 50px; /* Safari 6.1 and newer */
flex-basis: 50px;
}
The CSS flex-basis property syntax
The syntax for the flex-basis
property is as follows:
flex-basis:value;
The available property values are presented in the following section.

Pros Main Features
- Easy to use with a learn-by-doing approach
- Offers quality content
- Gamified in-browser coding experience
- The price matches the quality
- Suitable for learners ranging from beginner to advanced
- Free certificates of completion
- Focused on data science skills
- Flexible learning timetable

Pros Main Features
- Simplistic design (no unnecessary information)
- High-quality courses (even the free ones)
- Variety of features
- Nanodegree programs
- Suitable for enterprises
- Paid Certificates of completion

Pros Main Features
- A wide range of learning programs
- University-level courses
- Easy to navigate
- Verified certificates
- Free learning track available
- University-level courses
- Suitable for enterprises
- Verified certificates of completion
Property values
Value | Description |
---|---|
auto |
The default value. The size of the element depends on width and height properties |
content |
The size of the element depends on its content |
Length units | The initial size of the flex item defined in CSS length units (e.g., px) |
Percentages | The initial size of the flex item defined in percentages, representing the relation to the size of the parent flex container |
Browser support

Chrome
29+

Edge
12+

Firefox
22+

IE
11+

Opera
12.1+

Safari
9+
Mobile browser support

Chrome
29+

Firefox
22+

Opera
12.1+

Safari
9+