Advertisement
Google Ad Slot: content-top
CSS Flex Items
Flex items in CSS are the child elements of a flex container.
order:
Specifies the order of the flex item within the container.
flex-grow:
Specifies how much the item will grow relative to other items, based on available space in the container.The value must be a number, default value is 0.
flex-shrink:
Specifies how much the item will shrink relative to other items if there isn’t enough space in the container.The value must be a number, default value is 1.
flex-basis:
Defines the initial size of the flex item before space is distributed according to flex-grow or flex-shrink.
- Accepts values like
px,%,auto, etc. - Default value:
auto(size is based on content).
flex:
A shorthand for the three properties.flex-grow,flex-shrink,flex-basis
align-self:
Overrides the container's align-items property for a specific item.
Syntax:
align-items : auto | flex-start | flex-end | center | baseline | stretch;