{text-overflow} Property | CSS: Presentation Layer
Standards Based Development
text-overflow: clip
Clip text as appropriate. Glyphs may be only partially rendered. This text will be clipped.
text-overflow: ellipsis
Render an ellipsis (U+2026) to represent clipped text. This text should end in an ellipsis.
text-overflow: -o-ellipsis-lastline
Render an ellipsis (U+2026) to represent clipped text. This text spans over more than one line. The height has been set to fit around two lines of text. The second line should end in an ellipsis.
text-overflow allows for the definition of behavior(s) when text overflows out of its container, and the overflow is clipped (e.g., scroll or hidden). Default setting is text-overflow:clip, setting the text to be clipped at the point where it overflows, even if only a partial glyph is rendered.
text-overflow is only applied when text wrapping is supressed (e.g. using white-space:nowrap or white-space:pre).
text-overflow:clip clip Keyword Value
The clip keyword value clips text as appropiate. Glyphs may be only partially rendered.
text-overflow:ellipsis ellipsis Keyword Value
The ellipsis keyword value clips the text and adds an ellipsis (…) (U+2026) character.
text-overflow:-o-ellipsis-lastline -o-ellipsis-lastline Keyword Value
The -o-ellipsis-lastline is an Opera vendor-prefixed keyword value that renders an ellipsis (…) (U+2026) to represent clipped text.
Opera 10.60 effectively dropped support of its vendor prefixed text-overflow property, while also adding the ability to clip text on multi-line blocks. If text spans more than one line, the -o-ellipsis-lastline value can be specified, adding an ellipsis to the last line of visible text.
Note: ellipsis-lastline value is currently not in any specifications and can only be used via -o- prefix.