Style alignSelf Property
Style alignSelf Property
The alignSelf property is used for specifying alignment for the selected item inside the flexible container. It will override the default alignItems property.
Syntax:-
Its syntax is:- object.style.alignSelf OR object.style.alignSelf = auto|stretch|center|flex-start|flex-end|baseline|initial|inherit
Return:-
Its return is:- a string having align-self property of an element
Further Explanation:-
Value | Description |
---|---|
auto | The element inherits its parent container align-items property else stretch. |
stretch | The element is positioned to fit container |
center | The element is positioned at center of container |
flex-start | The element is positioned at beginning of container |
flex-end | The element is positioned at end of container |
baseline | The element is positioned at baseline of container |
initial | Sets property to its default value. |
inherit | Inherits property from its parent element. |