Posted By

JimSangwine on 05/05/11


Tagged


Versions (?)

Truncate String with Ellipsis


 / Published in: CSS
 

  1. /* All the following are required, so the text must be in a single straight line that overflows a box where that overflow is hidden. */
  2.  
  3. .truncate {
  4. width: 250px;
  5. white-space: nowrap;
  6. overflow: hidden;
  7. text-overflow: ellipsis;
  8. }

Report this snippet  

You need to login to post a comment.