Adding an ellipsis to an overflowing item.


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

Adding ellipsis to an overflowing item.


Copy this code and paste it in your HTML
  1. li {
  2. white-space: nowrap;
  3. width: 100%;
  4. overflow: hidden;
  5. -o-text-overflow: ellipsis;
  6. text-overflow: ellipsis;
  7. }

URL: http://www.smashingmagazine.com/2010/03/01/css-and-the-future-of-text/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.