CSS Text-overflow

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

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

Post comment

Links that you insert are not nofollowed, but will be removed by admins if they are considered spam.

[url=Absolute URL for page]TITLE[/url]

You should insert code boxes around code examples, which will be automatically syntax highlighted.

[code1 html|css|javascript|php|sql]Your Code Here[/code1]

You may want to read our Privacy Policy before submitting your comment.