thoughts
text-overflow: ellipsis for firefox
2008-06-30 modified: 2008-07-01
Firefox still does not implement the proposed CSS3 text-overflow property. It does however provide a similar behaviour for the XUL description element. Furthermore, it does support XBL bindings through CSS. This leads to the following solution:
.ellipsis {
text-overflow: ellipsis;
-moz-binding: url('ellipsis.xml#ellipsis');
and
<?xml version="1.0"?>
<bindings
xmlns="http://www.mozilla.org/xbl"
xmlns:xbl="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
>
<binding id="ellipsis">
<content>
<xul:description crop="end" xbl:inherits="value=xbl:text"><children/></xul:description>
</content>
</binding>
</bindings>
See the comment from William below for Firefox 2.x.
Additional resources (top 15)
Below is a list of additional resources that might contain extra information about the subject at hand. These are all sites linking to this one (i.e. backtracking).
- firefox通过XUL实现text-overflow:ellipsis的效果 - 样式之美 [zh-CN] (321)
- text-overflow: ellipsis for firefox - html-css-javascript - FriendFeed (195)
- Верстальщик-виртуоз. Задание 2 [ru] (103)
- text-overflow + Firefox - SWiK (99)
- Firefox - ellipses for grid cells - Ext JS Forums [en] (74)
- ÔÚdwÖÐÓÃtext-overflowµÄcssÑùʽÔõôʶ±ð²»Á˰¡¡£_°Ù¶ÈÖªµ... (70)
- 푸땡 » Blog Archive » [CSS] text-overflow:ellipsis 를 FireFox 에서 사용하기 [ko-KR] (60)
- Abschneiden zu langer Inhalte [de] (59)
- CSS Ninja - text-overflow:ellipsis in Firefox. Pure CSS solution. [en] (55)
- CSS - String Truncation with Ellipsis | A JavaScript, CSS, and XHTML Resource By Matt Sni... (54)
- CSS Ninja - text-overflow:ellipsis in Firefox. Pure CSS solution. [en] (54)
- Firefox - ellipses for grid cells - Ext JS Forums [en] (53)
- KiNGDOM :: [CSS] text-overflow:ellipsis 를 FireFox 에서 사용하기 (43)
- text-overflow: ellipsis for firefox - FriendFeed (33)
- Zielowy Jogg [pl] (19)
