I need to display some text on two lines, and add some “…” if the text is too long.
Example :
This is some long text and we need to show it on only two lines.
=>
This is some long text and we need ...
The text must be displayed with a <p> tag.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
text-overflow works on some browsers -> http://www.quirksmode.org/css/textoverflow.html
or
Excellent answer here -> Insert ellipsis (…) into HTML tag if content too wide
or
To just limit the showing of 2 lines -> jTruncate jQuery plugin works well