The order property of CSS can be used for ordering flex items. It specifies the order of a flex item with respect to the other flex items. The element has to be a flexible item for the order property to work. The elements are displayed in ascending order of their order values. If two elements have the same order value then they are displayed on the basis of their occurrence in the source code.
order: integer | initial | inherit
- Integer: It denotes the order of the flex items. The default value of a flex item is 0.
- Initial: It sets the property to its default value.
- Inherit: It means that the associated element takes the specified value of its parent element order property.
Supported Browsers: The browsers supported by Ordering Flex Items are listed below:
- Google Chrome 29.0, 21.0 -webkit-
- Mozilla Firefox 28.0, 18.0 -moz-
- Internet Explorer 11.0
- Safari 9.0, 6.1 -webkit-
- Opera 17.0
- Kotlin Collections Ordering
- CSS | flex Property
- Bootstrap 4 | Flex
- CSS | flex-wrap property
- CSS | flex-grow Property
- CSS | flex-direction Property
- CSS | flex-flow Property
- CSS | flex-basis Property
- CSS | flex-shrink Property
- HTML | DOM Style flex Property
- What is the difference between inline-flex and inline-block in CSS?
- How to set hamburger items on the right in bootstrap 4 ?
- How to remove items from a select box ?
- CSS | align-items Property
- Use of :even and :odd pseudo-classes with list items in CSS
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.