Flexbox Alignment & Justification Without the Guesswork

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateUI14 min

About this video

A CSS tutorial that explains the difference between justify-content and align-items in flexbox, introduces the main and cross axes, and shows how flex-direction, align-content, flex-wrap and margins affect alignment. It suits people who already write some CSS.

What you’ll learn

  • Tell apart justify-content and align-items by their axes
  • Change flex-direction and predict how alignment behaves
  • Use margins to align a single flex item