How can i "limit" a text inside a <p>?

user2315717 picture user2315717 · Apr 24, 2013 · Viewed 9.5k times · Source

i have a mail template newsletter here: http://www.newsletter.vendopor.com/m29-04-13/index2.html

But at the end, have a paragraph that contains that text: Por favor, envía este correo a las personas que creas le puede ayudar nuestro...

And this text, go out the paragraph (i have a width 380 attribute in css and keeps going out).

It's at the end of the page

I've searched in google, but can't find the solution

Works fine on Chrome, but in Mozilla (last version) the text is going out.

Thanks a lot for your help

Answer

Mr. Alien picture Mr. Alien · Apr 24, 2013

You can use text-overflow: ellipsis;

div {
    width:200px; 
    overflow:hidden; 
    border:1px solid #f00;
    text-overflow:ellipsis;
    white-space:nowrap; 
}
<div>This is very very long text This is very very long text This is very very long text </div>

Good Luck...