Order Property and Visual Reordering
Change the visual order of flex items without changing the DOM using the order property.
The order Property
The order property changes the visual order of flex and grid items without altering the DOM structure. Default is 0; higher values appear later; negative values appear earlier.
order Basics
Items are displayed from lowest to highest order value. Items with the same order value appear in DOM order.
.nav-logo { order: 0; } /* first */
.nav-links { order: 1; } /* second */
.nav-button { order: 2; } /* last */All lessons in this course
- Flex Item Alignment Override with align-self
- Order Property and Visual Reordering
- Flex Shorthand Patterns
- Common Flexbox Layouts: Nav Cards Media Object