CSS

CSS Intro

CSS Intro Quiz

CSS Intro Exercise

CSS Basic

CSS Basic Quiz

CSS Basic Exercise

CSS Advance

CSS Advance Quiz

CSS Advance Exercise

CSS3

CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

CSS flex Property

CSS flex Property

 

 

The flex property is used to set the flexible length of flexible items. It is a shorthand property for:-

  1. flex-grow
  2. flex-shrink
  3. flex-basis

 

Syntax:-

 

Its syntax is:- flex: flex-grow flex-shrink flex-basis|auto|initial|inherit;

 

Default Value:-

 

Its default value is 0 1 auto

 

Further Explanation:-

 

Value Description
flex-grow A number specifying how much the item will grow relative to the rest of the flexible items
flex-shrink A number specifying how much the item will shrink relative to the rest of the flexible items
flex-basis The length of the item. Values can be auto or in numerical form.
auto Same as 1 1 auto.
initial Same as 0 1 auto.
none Same as 0 0 auto.
inherit Inherits this property from its parent element.

Code Explanation

All Tutorials related to CSS Properties

All Sections related to CSS