Use this instead of white-space: nowrap

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

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

ShortIntermediateWeb DesignUI1 min

About this video

Shows how min-width: fit-content can replace white-space: nowrap, so text avoids overflow but still wraps when space runs out.

What you’ll learn

  • Replace white-space: nowrap with min-width: fit-content to prevent text overflow