box-ordinal-group property

Tutorials

Definition and Usage

The box-ordinal-group property specifies the display order of the child elements of a box.

Elements with a lower value are displayed before those with a higher value.

Note: The display order of the elements with the same group value depend on their source order.

Default value: 1
Inherited: no
Version: CSS3
JavaScript syntax: object.style.boxOrdinalGroup=2

Syntax

 box-ordinal-group: integer;

Values

Value Description
integer An integer that indicates the display order of the child elements

Examples

01 .box {
02     display:-ms-flexbox; /* Internet Explorer 10 */
03     display:-moz-box; /* Firefox */
04     display:-webkit-box; /* Safari and Chrome */
05     display:box;
06     border:1px solid black;
07 }
08 .ord1 {
09     margin:5px;
10     -ms-flex-order:1/* Internet Explorer 10 */
11     -moz-box-ordinal-group:1/* Firefox */
12     -webkit-box-ordinal-group:1/* Safari and Chrome */
13     box-ordinal-group:1;
14 }
15 .ord2 {
16     margin:5px;
17     -ms-flex-order:2/* Internet Explorer 10 */
18     -moz-box-ordinal-group:2/* Firefox */
19     -webkit-box-ordinal-group:2/* Safari and Chrome */
20     box-ordinal-group:2;
21 }

Rate article