⬅ Back

FLEXBOX — PRECISE NOTES

🔹 1. Basic structure

Flex container → parent element

Flex items → direct children

.container {
  display: flex;
}

🔹 2. flex-direction

Defines the direction of the main axis.

flex-direction: row | row-reverse | column | column-reverse;
Flexbox diagram

Values

➤ row (default)
➤ row-reverse
➤ column
➤ column-reverse

🔹 3. Axes

🧭 Main axis
🧭 Cross axis

🔹 4. Start / End points

These define where elements begin and end.

🔸 Main axis points
🔸 Cross axis points

🔹 5. Direction examples

Example 1

flex-direction: row;

Example 2

flex-direction: row-reverse;

Example 3

flex-direction: column;

Example 4

flex-direction: column-reverse;

🔹 6. Key rules

🔥 SHORT MEMORY VERSION

⬅ Back