#1 The text-overflow CSS property
This is super useful when you don’t have enough space for some content. For example a title, a description, an excerpt.
What does it do? It determines how overflowed content that is not displayed is clipped and it adds this nice ...
at the end.
1 2 3 |
.clipped-text { text-overflow: ellipsis; } |
It has to be applied to block container elements (or inline-block).
How does it look?
To make it work you have to add also white-space: nowrap;
and overflow: hidden;