Ruslan Ulanov’s Codeshack

The developer’s notebook

CSS property: text-overflow

leave a comment

A better way to display lines that are way too long to fit in one line:

.longline {
  width: 200px; /* width is required */
  white-space: nowrap;
  overflow-x: hidden;
  overflow-y: hidden;
  text-overflow: ellipsis;

Written by Ruslan Ulanov

November 18th, 2010 at 2:43 am

Posted in CSS

Tagged with ,