Adding ellipsis to the first of a set of spans

rileyouter

New Member
I have something like this:\[code\]<p id="container"> <span id="t1">This could be a very long text </span> <span id="t2"> suffix 1</span> <span id="t3"> suffix 2</span></p>\[/code\]What I would like to do is, depending on the space available for the #container, adding ellipsis to the first of the spans so I would end up with something such as:\[quote\] This is a very long text suffix 1 suffix 2 // If enough space available for everything. This is a very long... suffix 1 suffix 2 // If there is not enough space available for everything. This is a v... suffix 1 suffix 2 // If there is even less space available.\[/quote\]As you can see, the space for the suffix should be always preserved and only the first span text should be applied ellipsis.Thank you very much for your help in advance! ;-)
 
Back
Top