Gets or sets a value that specifies the alignment (perpendicular to the layout axis defined by the -ms-flex-direction property) of child elements of the object.
This property is read/write.
![]() ![]() |
Syntax
-ms-flex-align: start | end | center | baseline | stretch
Property values
One of the following alignment values.
start-
If the parent element has a computed value for -ms-flex-direction of "row" or "column", the leading edge (or baseline) of each child element is aligned with the leading edge of the object. Any remaining space, perpendicular to the layout axis, is placed after the trailing edge of each child element.
If the parent element has a computed value for -ms-flex-direction of "row-reverse" or "column-reverse", the trailing edge (or baseline) of each child element is aligned with the trailing edge of the object. Any remaining space, perpendicular to the layout axis, is placed before the leading edge of each child element.
end-
If the parent element has a computed value for -ms-flex-direction of "row" or "column", the trailing edge of each child element is aligned with the trailing edge of the object. Any remaining space, perpendicular to the layout axis, is placed before the leading edge of each child element.
If the parent element has a computed value for -ms-flex-direction of "row-reverse" or "column-reverse", the leading edge of each child element is aligned with the leading edge of the object. Any remaining space, perpendicular to the layout axis, is placed after the trailing edge of each child element.
center-
Each child element is centered between the leading and trailing edges of the object. Any remaining space, perpendicular to the layout axis, is evenly distributed before and after each child.
stretch-
Initial value. Each child element is stretched to completely fill the space that is available perpendicular to the layout axis. If set, the maxWidth or maxHeight property for a child element takes precedence and layout follows the start rule.
baseline-
The baselines (leading edge or trailing edge depending on the -ms-flex-direction property) of all child elements are aligned with each other.
The child element that occupies the most space, perpendicular to the layout axis, follows the start rule; the baselines of all remaining elements are then aligned with the baseline of this element.
CSS information
| Applies To | flexbox elements |
|---|---|
| Media | visual |
| Inherited | no |
| Initial Value | stretch |
Standards information
- Flexible Box Layout Module, Section 8.2
See also
Send comments about this topic to Microsoft
Build date: 11/29/2012

