Killersites.com Homepage Welcome Guest   |   Register  |  Login
Login Name Password
  Search  
  Index  | Recent Threads  | Unanswered Threads  | Who's Online  | User List  | Help



Quick Go »

No member browsing this thread
Thread Status: Active
Total posts in this thread: 6
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 3099 times and has 5 replies Next Thread
Male vanlal
Stranger
Member's Avatar


Joined: Oct 29, 2007
Post Count: 10
Status: Offline
Reply to this Post  Reply with Quote 
break-all not working for special characters

Hi all ,
I have the following
Css file :-

.text-left{
text-align:left;
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */

}


In one of my jsps, i have the following column

<td class="text-left" style="word-break: break-all;"><a href="javascript:detailcheck(<%=param%>)"><%=Name%></a></td>


style="word-break: break-all;" this is not behaving properly ..

This line is not breaking the word at all for
1)abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst
uv
2)!!!!!!!!!!!!!!!!"""""""""""!!!!!:::::::::::::::

If it is only alphabets , it is able to break .. but when everything is special characters it does not break ...
When one does not break , it leads to the distortion of the whole table ..
Is there any way to ensure that the names break properly ..

Thanks in advance

[Dec 17, 2008 12:30:33 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Male Wickham
Advanced Member
Member's Avatar

UK
Joined: Sep 17, 2007
Post Count: 590
Status: Offline
Reply to this Post  Reply with Quote 
Re: break-all not working for special characters

Substitute the special characters with their code equivalents from here:-
http://www.tedmontgomery.com/tutorial/HTMLchrc.html

and they may (should) be treated as normal alphabet characters.
----------------------------------------
Code downloaded to my PC will be deleted in due course.
WIN XP SP3; IE7, Firefox 3.0, Opera and Safari for Windows; screen resolution usually 1024x768.
IE6 on W98 with 800*600.
[Dec 17, 2008 1:20:55 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Male ewwatson
Advanced Member
Member's Avatar

United States
Joined: Dec 19, 2007
Post Count: 1285
Status: Offline
Reply to this Post  Reply with Quote 
Re: break-all not working for special characters

All Possible Ways To Prevent a Long String of...owing it's Container!.
----------------------------------------
Eric :~)
Knowledge is Power
----------------------------------------
[Edit 2 times, last edit by ewwatson at Dec 18, 2008 7:10:35 AM]
[Dec 17, 2008 7:21:08 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Male vanlal
Stranger
Member's Avatar


Joined: Oct 29, 2007
Post Count: 10
Status: Offline
Reply to this Post  Reply with Quote 
Re: break-all not working for special characters

Hi ,

Saw the link you gave and tried to used it ..

<td class="text-left" style="word-break: break-all;"><a href="javascript:detailcheck(<%=param%>)"><%=Name%></a></td>


How do i use this js solution for the <%=Name%>
Since Name is from the java part , i don't know how to pass it to the js solution that you gave ...

Thanks ..
[Dec 17, 2008 11:50:00 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Male ewwatson
Advanced Member
Member's Avatar

United States
Joined: Dec 19, 2007
Post Count: 1285
Status: Offline
Reply to this Post  Reply with Quote 
Re: break-all not working for special characters

Hi ,

Saw the link you gave and tried to used it ..

<td class="text-left" style="word-break: break-all;"><a href="javascript:detailcheck(<%=param%>)"><%=Name%></a></td>


How do i use this js solution for the <%=Name%>
Since Name is from the java part , i don't know how to pass it to the js solution that you gave ...

Thanks ..


Which JS solution - there are like 5 different ones?
----------------------------------------
Eric :~)
Knowledge is Power
[Dec 18, 2008 7:09:43 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Male ewwatson
Advanced Member
Member's Avatar

United States
Joined: Dec 19, 2007
Post Count: 1285
Status: Offline
Reply to this Post  Reply with Quote 
Re: break-all not working for special characters

Another possible solution for you, if you don't mind if the text overflows but you just don't want to comprimise your layout (you don't want your table to expand to fit), then just give your table the rule table-layout:fixed. And then for IE give the inner elements position relative (otherwise IE clips it), and then all the text will just flow out without expanding your layout.
----------------------------------------
Eric :~)
Knowledge is Power
[Dec 18, 2008 8:21:18 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread