This lesson goes beyond display: flex into the container and item properties that control real layout decisions. Three specimens cover axis direction and alignment, proportional growth with flex shorthand, and wrapping behavior when items exceed the container width.

What this covers

  • Main axis vs cross axis: flex-direction, justify-content, align-items
  • flex: 1 and flex: 2 growth ratios for proportional sizing
  • flex-wrap: wrap to let items reflow onto new lines

Flexbox deep dive specimen

Preview