Tutorial Truncate String with Ellipsis

by in , 0

All the following are required, so the text must be in a single straight line that overflows a box where that overflow is hidden.

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

A bunch of more techniques here, including multi-line ellipsis.

Leave a Reply