Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

html

text

out

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

like image 810
user2315717 Avatar asked Dec 04 '22 11:12

user2315717


1 Answers

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...

like image 105
Mr. Alien Avatar answered Jan 11 '23 00:01

Mr. Alien