Style textOverflow property
- Previous Page textIndent
- Next Page textShadow
- Go to the Previous Level HTML DOM Style Object
Definition and usage
textOverflow
Specifies what should happen when text overflows the containing element.
See also:
CSS Reference Manual:text-overflow property
Example
Change textOverflow property:
document.getElementById("myDIV").style.textOverflow = "ellipsis";
Syntax
Return textOverflow property:
object.style.textOverflow
Set textOverflow property:
object.style.textOverflow = "clip|ellipsis|string|initial|inherit"
Property 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 also initial. |
inherit | Inherits this property from its parent element. See also inherit. |
Technical details
Default value: | clip |
---|---|
Return value: | a string representing the text-overflow property. |
CSS Version: | CSS3 |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |
- Previous Page textIndent
- Next Page textShadow
- Go to the Previous Level HTML DOM Style Object