Style alignItems Property
Style alignItems Property
The alignItems property is used to specify default alignment for items inside the flexible container. To override it, we have to use the align-self property.
Syntax:-
Its syntax is:- object.style.alignItems OR object.style.alignItems = stretch|center|flex-start|flex-end|baseline|initial|inherit
Return:-
Its return is:- a string having align-items property of an element
Further Explanation:-
Value | Description |
---|---|
stretch | Items are stretched to fit container |
center | Items are positioned at center of container |
flex-start | Items are positioned at beginning of container |
flex-end | Items are positioned at end of container |
baseline | Items are positioned at baseline of container |
initial | Sets property to its default value. |
inherit | Inherits property from its parent element. |