Flex-direction

In this lesson, we will learn the different flex-direction settings to confidently use both horizontal and vertical Flexbox containers. We will introduce the concepts of the main-axis and cross-axis to think about Flexbox layouts on a different level.

Setting the main and cross axes using flex-direction

Flexbox uses flex-direction to set both the main axis and the cross axis. The flex-direction property also sets the order in which flex-items flow inside the flex container.

We have four possible values for the flex-direction property:

  • row: this is the default value, you don’t need to set it manually. Elements flow from left to
...