CSS order property

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.

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.

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.

order: 1;

Applicable to

It applies to flex items.

#CSS digger
Was this article helpful?

 

1

2

3

4

×

Ctrl+D