A responsive card with no media queries

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

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

IntermediateUI6 min

About this video

A CSS tutorial showing how flex-basis, flex-wrap and min-inline-size: 0 keep a flexbox card layout responsive when it holds a large image, without media queries. It suits web developers and designers who already know basic CSS.

What you’ll learn

  • Stop a large image from breaking a flexbox card layout
  • Combine flex-basis and flex-wrap for intrinsic card layouts
  • Use min-inline-size: 0 to let flex items shrink correctly