Style textOverflow attribute

Definition and usage

textOverflow Specifies what should happen when text overflows the containing element.

See also:

CSS Reference Manual:text-overflow attribute

Example

Change textOverflow attribute:

document.getElementById("myDIV").style.textOverflow = "ellipsis";

Try it yourself

Syntax

Return textOverflow attribute:

object.style.textOverflow

Set textOverflow attribute:

object.style.textOverflow = "clip|ellipsis|string|initial|inherit"

Attribute value

Value Description
clip Default value. Clip text.
ellipsis Renders an ellipsis ("...") to represent the clipped text.
string Renders the given string to represent the clipped text.
initial Sets this property to its default value. See initial
inherit Inherits this property from its parent element. See inherit

Technical details

Default value: clip
Return value: string representing the element's text-overflow attribute
Έκδοση CSS: CSS3

Υποστήριξη περιηγητή

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Υποστήριξη Υποστήριξη Υποστήριξη Υποστήριξη Υποστήριξη