# Flexbox: Lining Things Up in a Row or a Column

One line of CSS, display: flex, lines up an element's children in a row, flex-direction turns the row into a column, and the main and cross axes name the two directions every other flexbox property works along.

![Cheat sheet: Flexbox: Lining Things Up in a Row or a Column](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/10/fbbade911235452fabc88fefd0918c3b.webp)

- Category: CSS
- Level: Apprentice
- Tags: Cross axis, CSS, Flex container, Flex direction, Flex item, Flexbox, Main axis
- Updated: November 1, 2026

Source: https://www.ask-codey.com/cheat-sheets/css-flexbox-basics-cheat-sheet
