Home  »  CodeSnippets   »   CSS Stop Text From Wrapping

CSS Stop Text From Wrapping

Posted: March 5, 2022 | by Michael Bright

Example to stop the text from wrapping in CSS.

div {
  white-space: nowrap;
  overflow: hidden;
}

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.