Click here to Skip to main content
15,890,440 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have made a css class ".views" and I have given it the fixed width and height. I have applied this class to a tag. I want when I put some text which is longer than its specific width the text do not cross its width and automatically shows at its end this symbol "...." as it is continue yet.

How can I do that? Would some one help me plz?
Posted
Updated 23-Mar-11 1:29am
v2
Comments
Sergey Alexandrovich Kryukov 23-Mar-11 17:35pm    
I don't think this is possible. You need to use different design...
--SA

1 solution

You need to set the CSS property text-overflow: ellipsis on your views class. There are some very specific steps you must also follow to ensure this property works, see this page[^] for instructions.

Note that this technique does not work in Firefox. If you wish to support Firefox, you could try this jQuery plugin[^].
 
Share this answer
 
Comments
rashidfarooq 26-Mar-11 14:07pm    
Thanks A lot Brother for Helping Me. I understood the solution.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900