CSS text-overflow Property
In CSS, the text-overflow property specifies that some text has overflown and is hidden from view. The white-space and overflow properties must be set to nowrap and hidden, respectively. Overflowing content can be clipped, an ellipsis (...) displayed, or a custom string displayed.
The text-overflow property does not compel an overflow. To make text overflow its container, you must use the overflow and white-space CSS properties.
Syntax
Property Values
Value | Description |
---|---|
clip | The default value. The text has been clipped and is no longer accessible. |
ellipsis | To represent the clipped text, draw an ellipsis ("..."). |
string | To represent the clipped text, render the given string. |
initial | This property is set to its default value. |
inherit | This property is inherited from its parent element. |
Supported Browsers
Property | Chrome | Firefox | Safari | Edge / IE | Opera |
---|---|---|---|---|---|
text-overflow | 4.0 | 7.0 | 3.1 | 6.0 |
11.0
9.0 -o- |