Some experimentation with the text-overflow property.

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN”
    “http://www.w3.org/TR/html4/strict.dtd”>
<html>
  <body>
<div style=”border: 1px solid red; max-width: 400px; overflow:hidden; text-overflow: ellipsis;”>
<nobr>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ac libero nec est luctus aliquam. Nulla sodales, dolor a consectetur volutpat, elit mi convallis sem, at ornare ligula odio non metus. </nobr>
</div>
</body>
</html>

Firefox 3.5

Safarai 4

IE 7

By Jason

Leave a Reply

Your email address will not be published. Required fields are marked *