Page 1 of 1

Firefox Fails - text-overflow: ellipsis;

Posted: Wed Jul 20, 2011 1:54 pm
by unemployment
Does anyone know how to generate a cross browsers compatible ellipse using CSS?

It seems as if firefox doesn't support the text-overflow: ellipsis; property.

Re: Firefox Fails - text-overflow: ellipsis;

Posted: Wed Jul 20, 2011 3:17 pm
by jacek
If it doesn't support it there is not much you can do, it will be added in version 7 according to https://developer.mozilla.org/En/CSS/text-overflow

I think the closest you could get would be to clip the text at a specific length with php or javascript. Depending on the element you need this on you could try things like covering up the text with a div that has the "..." in it, but that would look weird when it covers half a letter.

EDIT: this explains what I mean a little better http://www.jide.fr/english/emulate-text ... x-with-css

Re: Firefox Fails - text-overflow: ellipsis;

Posted: Wed Jul 20, 2011 4:22 pm
by unemployment
Fixed but very challenging.

This JS Fiddle link put me in the right direction, but it still required some ingenuity.

http://jsfiddle.net/marcoos/9Z4A4/