How to set max length from a text and end it with ...
?
I already tried substr
, but it just cut first and last text.
What I want is, for example I have a div
with width: 500px
and height: 500px
when the text exceed height, text will cut with ...
.
I want like this
I tried like this but, text will cut when exceed width not height.
I used following css :
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;