Truncating Text with CSS


/ Published in: CSS
Save to your folder(s)

Truncate text using only CSS. IE 6+, Safari 4+, Firefox 7+, Opera 11+ and Chrome 10+:


Copy this code and paste it in your HTML
  1. .truncated_link {
  2. text-overflow: ellipsis;
  3. display: inline-block;
  4. width: 275px;
  5. white-space: nowrap;
  6. overflow: hidden;
  7. vertical-align: top;
  8. }

URL: http://amix.dk/blog/post/19661

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.