Skip to content

Instantly share code, notes, and snippets.

@starmer
Created March 10, 2011 21:37
Show Gist options
  • Select an option

  • Save starmer/864984 to your computer and use it in GitHub Desktop.

Select an option

Save starmer/864984 to your computer and use it in GitHub Desktop.
Ellipsis in CSS
// http://www.mattsnider.com/css/css-string-truncation-with-ellipsis
.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
-moz-binding: url('ellipsis.xml#ellipsis');
}
<?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:window>
<xul:description crop="end" xbl:inherits="value=xbl:text"><children/></xul:description>
</xul:window>
</content>
</binding>
</bindings>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment