CSS align items Property
CSS align-items Property
The align-items property is used to specify the default alignment for items inside the flexible container. To override this property, we have to use the align-self property.
Syntax:-
Its syntax is:- align-items: stretch | center | flex-start | flex-end | initial | baseline | inherit;
Further Explanation:-
Value | Description |
---|---|
stretch | Default. Items are stretched to fit the container |
center | Items are positioned at the center of the container |
flex-start | Items are positioned at the beginning of the container |
flex-end | Items are positioned at the end of the container |
baseline | Items are positioned at the baseline of the container |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |