CSS flex: order of the items
The CSS order
property defines the position of a specific flex item in the order of flex items in the same container:
/* Code for Safari 6.1 to 8.0 */
div#Red {-webkit-order: 2;}
div#Blue {-webkit-order: 4;}
div#Green {-webkit-order: 3;}
div#Pink {-webkit-order: 1;}
/* Standard syntax */
div#Red {order: 2;}
div#Blue {order: 4;}
div#Green {order: 3;}
div#Pink {order: 1;}
By default, the order of displayed items depends on their order in the source document. Using CSS order
, you can manipulate it as you wish.
Note: CSS
order
only works on flex containers.

- Easy to use with a learn-by-doing approach
- Offers quality content
- Gamified in-browser coding experience
- The price matches the quality
- Suitable for learners ranging from beginner to advanced
- Free certificates of completion
- Focused on data science skills
- Flexible learning timetable

- Simplistic design (no unnecessary information)
- High-quality courses (even the free ones)
- Variety of features
- Nanodegree programs
- Suitable for enterprises
- Paid Certificates of completion

- A wide range of learning programs
- University-level courses
- Easy to navigate
- Verified certificates
- Free learning track available
- University-level courses
- Suitable for enterprises
- Verified certificates of completion
The syntax for CSS order
To syntax for this property is very straightforward – you just need to define the item's place in your preferred order:
order: value;
The default value for CSS flex order is 0
. You can use any unitless number, including negative values.
Browser support

Chrome

Edge

Firefox

IE

Opera

Safari
Mobile browser support

Chrome

Firefox

Opera
