CSS CSS Flexbox Layout Building a Layout with Flexbox Creating a Three Column Layout with Flexbox

Kymane Llewellyn
Kymane Llewellyn
10,603 Points

Flex-box order?

How come when Guil changes the flex-box order for the secondary column to -1, it appears first in the flex-box item order


it appears second when the screen size is reduced?

I'm confused because he didn't use any media queries for this.

1 Answer

Ryan S
Ryan S
27,264 Points

Hi Kymane,

I don't quite understand what you mean about the media queries. All of the code in this video was written in the media queries.

The order of -1 was only given to the secondary column at a minimum width of 769px and above. So any width smaller than 769px will revert to it's original order (the way it appears in the html). You don't need to define this in a media query because it was all written using a mobile-first approach.

Hope this clears things up.

pat barosy
pat barosy
6,759 Points

Why was the order -1 placed in media query that targeted view screens of 769px and up? Why wasn't it placed in the second media query which displays all three lines?