How to "truncate" long strings with an ellipsis (...) for text that overflows its container

PHOTO EMBED

Sun Jan 05 2020 18:59:56 GMT+0000 (Coordinated Universal Time)

Saved by @billion_bill #css #webdev #text

.truncate {
  width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
content_copyCOPY

Just add the truncate class to the text element.

https://css-tricks.com/snippets/css/truncate-string-with-ellipsis/