Revision Content

Summary

The text-overflowCSS property determines how overflowed content that is not displayed is signaled to the users. It can be clipped, display an ellipsis ('…', U+2026 Horizontal Ellipsis) or a Web author-defined string.

This CSS property doesn't force an overflow to occur, to do so and make text-overflow to be applied, the author must apply some additional properties on the element, like setting {{ cssxref("overflow") }} to hidden.

Syntax

Is a keyword indicating to use the value of this CSS property that the parent element of the element uses.

end-overflow-type

Is an <overflow-type> CSS value describing the overflow to perform at the end of the line. The end of the line is its right end if the text is written with left-to-right directionality, it is its left end if the text is written with right-to-left directionality.

left-overflow-type

Is an <overflow-type> CSS value describing the overflow to perform at the left end of the line. The directionality of the text has no influence on which end of the line is affected.

right-overflow-type

Is an <overflow-type> CSS value describing the overflow to perform at the right end of the line. The directionality of the text has no influence on which end of the line is affected.

<overflow-type>

The <overflow-type> CSS type describes how text overflow, when not visible, must be handled. The following values are valid:

clip

This keyword value indicates to truncate the text at the limit of the content area. This is the default value.

ellipsis

This keyword value indicates to display ellipses ('…', U+2026 Horizontal Ellipsis) to represent clipped text. The ellipsis is displayed inside the content area, shortening more the size of the displayed text. If there is not enough place to display ellipsis, they are clipped.

string

The {{ xref_cssstring() }} to be used to represent clipped text. The string is displayed inside the content area, shortening more the size of the displayed text. If there is not enough place to display string, they are clipped.

Specifications

A previous version of this interface reached the Candidate Recommendation status. As some not-listed-at-risk features needed to be removed, the spec was demoted to the Working Draft level, explaining why browsers implemented this property unprefixed, though not at the CR state.