2 better alternatives to overflow: hidden

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

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

IntermediateUI11 min

About this video

A CSS tutorial comparing overflow: hidden with overflow: clip and contain: paint, showing how to target the element causing overflow and when each option is appropriate. It is aimed at front-end developers and designers who already write CSS.

What you’ll learn

  • Diagnose which element is causing unwanted overflow before changing it
  • Use overflow: clip to hide content without the side effects of overflow: hidden
  • Compare contain: paint for clipping and performance trade-offs