O'Reilly logo

CSS Pocket Reference, 4th Edition by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

text-overflow

Values:

clip | ellipsis

Initial value:

clip

Applies to:

Block-level elements

Inherited:

No

Computed value:

Same as declared values

Description:

Defines the behavior when inline content overflows its parent element’s box in cases where the parent element does not have an overflow value of visible. The default value is the historical behavior, where the content is simply clipped to the edges of the parent’s box. The value ellipsis means the content should be clipped but an ellipsis (…) is inserted at or near the “end” of the element. In a top-to-bottom, left-to-right language such as English, this would place the ellipsis at or near the bottom-right corner of the element.

Examples:

pre {text-overflow: clip;}
article {text-overflow: ellipsis;}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required