Gotcha: Forgetting flex on the Parent

The flex class must be applied to the direct parent of the items you want to align.

Incorrect: Without flex on parent

Items stack vertically by default (as block elements).

Item A
Item B
Item C

Correct: With flex on parent

Items align horizontally when parent has flex .

Item X
Item Y
Item Z

Key Takeaway:

Always ensure the container that directly holds the items you want to arrange in a row has the flex class.