Warning: This is a property of the original CSS Flexible Box Layout Module standard which is being replaced by a new standard.
See Flexbox for more information.
The CSS box-ordinal-group
property assigns the flexbox's child elements to an ordinal group. See Flexbox for more about the properties of flexbox elements.
/* <integer> values */ box-ordinal-group: 1; box-ordinal-group: 5; /* Global values */ box-ordinal-group: inherit; box-ordinal-group: initial; box-ordinal-group: unset;
Ordinal groups may be used in conjunction with the box-direction
property to control the order in which the direct children of a box appear. When the computed box-direction
is normal, a box will display its elements starting from the lowest numbered ordinal group and ensure that those elements appear to the left (for horizontal boxes) or at the top (for vertical boxes) of the container. Elements with the same ordinal group are flowed in the order they appear in the source document tree. In the reverse direction, the ordinal groups are examined in the same order, except the elements appear reversed.
Initial value | 1 |
---|---|
Applies to | children of box elements |
Inherited | no |
Media | visual |
Computed value | as specified |
Animation type | discrete |
Canonical order | the unique non-ambiguous order defined by the formal grammar |
Syntax
Any positive integer.
Formal syntax
<integer>
Specifications
Flexible Box Layout Module (W3C Working Draft)
Old Flexible Box Layout Module
Browser compatibility
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | (Yes)-webkit | (Yes)-webkit | (Yes)-moz[1] | No support | (Yes)-webkit | 1.1-khtml 3.0-webkit |
Feature | Android | Chrome for Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|---|
Basic support | ? | ? | (Yes)-webkit | ? | No support | ? | 1.0-webkit |
[1] In addition to the -moz
prefixed support, Gecko 48.0 (Firefox 48.0 / Thunderbird 48.0 / SeaMonkey 2.45) added support for a -webkit
prefixed version of the property for web compatibility reasons behind the preference layout.css.prefixes.webkit
, defaulting to false
. Since Gecko 49.0 (Firefox 49.0 / Thunderbird 49.0 / SeaMonkey 2.46) the preference defaults to true
.