CSS order property
Browser support · legacy reference
ChromeFully supports
SafariFully supports
FirefoxFully supports
Internet ExplorerPartial support
EdgeFully supports
OperaFully supports
Description
CSS order determines the order of a flex item. The order means a flex item placed anywhere in the list of flex items can be positioned at the start or end of of this list.
We have four flex items in the flex container. We'll position the third flex item with order property.
Syntax
order : integer
Property values
integerDefault
-
An integeral value determines the order of flex item in a flex container. 0 value does not change the position of flex item.
- Try it
order: 0; -ve integer
-
-1 value positions the third flex item at the start of container.
This value positions the third item (3) at the start of flex container.
- Try it
order: -1; +ve integer
-
1 value positions the third flex item at the end of flex container. This value positions the third item at the end of flex container
This value positions the third item (3) at the end of flex container.
- Try it
order: 1;
Applicable to
It applies to flex items.