Click here to Skip to main content
11,643,493 members (81,715 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: CSS HTML
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 23-Mar-11 1:13am
Edited 23-Mar-11 1:29am
SAKryukov at 23-Mar-11 17:35pm
I don't think this is possible. You need to use different design...

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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[^].
rashidfarooq at 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)

  Print Answers RSS
0 OriginalGriff 485
1 480
2 DamithSL 328
3 Sergey Alexandrovich Kryukov 270
4 CPallini 222
0 DamithSL 541
1 OriginalGriff 495
2 Mika Wendelius 469
3 Sergey Alexandrovich Kryukov 330
4 Afzaal Ahmad Zeeshan 324

Advertise | Privacy | Mobile
Web02 | 2.8.150731.1 | Last Updated 23 Mar 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100