The problem with percentages in CSS

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

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

IntermediateUIWeb Design9 min

About this video

Explains why fixed percentage widths cause layout problems in CSS and shows how Flexbox and Grid, including gap and fr units, avoid them. Aimed at people who already build web layouts.

What you’ll learn

  • Replace fixed percentage widths with Grid or Flexbox layouts
  • Use gap and the fr unit to space layout items
  • Decide when Flexbox or Grid suits a layout