Hide overflowing text with trails (...)

0 views - 1 minute readEdit this post

I rely on your support to keep this website running. If you find the content valuable, please consider making a small donation. whether it’s ₹25/$1 or ₹500/$5.

Donate

Secured by Stripe

We can use text-overflow: ellipsis to hide any overflowing text

Demo

p {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

Did you enjoyed the post?

Twitter (x)