What is flex in css? | Sololearn: Learn to code for FREE!


What is flex in css?

2/8/2017 7:41:37 AM

Saumya Saloni

3 Answers

New Answer


The flex CSS property is a shorthand property specifying the ability of a flex item to alter its dimensions to fill available space. Flex items can be stretched to use available space proportional to their flex grow factor or their flex shrink factor to prevent overflow.


Flex ( stand for 'FLEXible' box or 'flexbox' ) is another box model positioning ( layout ) mode providing an complementary alternative to standard layout mode of Html ( the box model, with block/inline elements ) and others a few less common ( positionned modes, float mode, table display... ) and based on box model. Check this reference source to get more information about: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Using_CSS_flexible_boxes


flex property specifies the length of the item, relative to the rest of the flexible items inside the same container. Check this for more brief description : https://css-tricks.com/almanac/properties/f/flex/