Click here to Skip to main content
Rate this: bad
good
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 2:13am
Edited 23-Mar-11 2:29am
v2
Comments
SAKryukov at 23-Mar-11 17:35pm
   
I don't think this is possible. You need to use different design...
--SA

1 solution

Rate this: bad
good
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[^].
  Permalink  
Comments
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 381
1 Sergey Alexandrovich Kryukov 245
2 Marcin Kozub 225
3 Praneet Nadkar 217
4 /\jmot 189
0 OriginalGriff 8,284
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,614
3 Maciej Los 4,989
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 23 Mar 2011
Copyright © CodeProject, 1999-2014
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