PDA

View Full Version : How to add Ellipses to long text in a list



ssdesign
5 Aug 2010, 8:59 PM
Hi,
Is there a feature to truncate long text in a list and add 'ellipses' instead?

Or, is there a way I can apply this CSS?


overflow: hidden;
text-overflow: ellipsis;

fx-mike
25 Aug 2010, 5:55 AM
Hi
This is the solution I have been using so far:

Something like this in list config:


...
tpl: '<tpl for="."><div class="list"></div></tpl>'
...


This in your css file:


.list {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

bhupesh
28 Feb 2011, 8:52 PM
Is there any way we can get multiline ellipsis? :s

Such that a division will have a specific height and if the second line is big enough that is cant fit in that division it will put ellipsis there.

Lorem ipsum dolor sit amet, Lorem ipsum dolor sit amet,
Lorem ipsum dolor sit amet, Lorem ipsum dolor sit am...


I've tried taking off word-wrap attribute in style but it seems to stop ellipsis from working.

Can someone please help?

EDIT: Sorry, just realized this is css3 property. Wrong forum. :(