CSS order Property
Example
Set the order of the flex container's child elements:
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Numbers following -webkit-, -ms-, or -moz- indicate the first version that supported the prefixed property.
| Property | |||||
|---|---|---|---|---|---|
| order | 29.0 <br>21.0 -webkit- | 11.0 | 28.0 <br>18.0 -moz- | 9.0 <br>6.1 -webkit- | 17.0 |
Definition and Usage
The order property sets or retrieves the order in which child elements of a flex container appear.
Note: The order property has no effect if the element is not a flex item.
| Default value: | 0 |
|---|---|
| Inherited: | No |
| --- | --- |
| Animatable: | Yes, see individual properties. Refer to Animatable Try it |
| --- | --- |
| Version: | CSS3 |
| --- | --- |
| JavaScript syntax: | object.style.order="2" Try it |
| --- | --- |
CSS Syntax
Property 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