By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

CSS Text-overflow

Reference on text-overflow of CSS, a list of allowed values, and useful examples.

Created: 2012-02-25 17:18

The CSS Text-overflow property controls the overflow of text inside block elements.

Note. The Text-overflow property only applies to block elements.

Possible Values

  • visible overflow
  • clipped overflow
  • ellipses
  • custom string

Text-overflow Example

div {
  white-space: nowrap;
  width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
This is an Example Div using above CSS

The above is an example div using the above CSS, if your browser supports text-overflow, you should see something like whats shown in the below image.

text overflow ellipses example