Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
158
rated 0 times [  159] [ 1]  / answers: 1 / hits: 25040  / 11 Years ago, mon, june 10, 2013, 12:00:00

I was wondering if there is any clever way, to achieve the css ellipsis effect without the need to apply white-space: nowrap also.



In other words, lets say we have a block element of a certain height and we'd like to let it get filled up with text-content, but the ellipsis should get applied as soon as there is no more room in horizontal plus vertical directions.



Quick example: http://jsfiddle.net/fpv9n/2/



Text should be like it is, but also with an ellipsis at the end. Any way to achieve that using CSS ? I would take JS solutions also into consideration.


More From » html

 Answers
136

There is no way to do this using pure CSS. It's monstrous and sad. I've often desired this myself when you want the browser to ellipsify a multi-line text with possibly overflowing text whenever it spills out of the container.


[#77710] Saturday, June 8, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
aileent

Total Points: 556
Total Questions: 107
Total Answers: 101

Location: Croatia
Member since Fri, Sep 11, 2020
4 Years ago
;