Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

CSS order property

CSS order property

CSS Reference Manual CSS Reference Manual

Example

Set the order of the flexbox object elements:

div#myRedDIV {order:2;}

div#myBlueDIV {order:4;}

div#myGreenDIV {order:3;}

div#myPinkDIV {order:1;}

Try it »


Browser support

The numbers in the table indicate the version number of the first browser that supports this property.

The number immediately following -webkit-, -ms-, or -moz- is the first version that supports the prefixed property.

property
order 29.0
21.0 -webkit- 11.0 28.0
18.0 -moz- 9.0
6.1 -webkit- 17.0

Definition and Usage

The order property sets or retrieves the order in which the child elements of a flexbox model object appear.

**Note:** If the element is not a flexbox object, the order property has no effect.

Default value: 0
Inherited: No
Animatable: Yes,See the individual propertiesSee Animatable. Try it
Version: CSS3
JavaScript syntax: object.style.order="2" Try it

CSS Syntax

order:

number

|initial|inherit;

Attribute values

Value Description
number The default value is 0. Specifies the order of the flexible item.
initial Sets this property to its default value. See initial.
inherit Inherits this property from its parent element. See inherit.

Related Articles

CSS Reference Manual:flex Property

CSS Reference Manual:flex-basis Property

CSS Reference Manual:flex-direction Property

CSS Reference Manual:flex-flow Property

CSS Reference Manual:flex-grow Property

CSS Reference Manual:flex-shrink Property

CSS Reference Manual:flex-wrap Property

CSS Reference Manual:align-content Property

CSS Reference Manual:align-items Property

CSS Reference Manual:align-self Property

CSS Reference Manual CSS Reference Manual