![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Nov 2005
Posts: 149
Rep Power: 4
![]() |
advanced wordwrap?
If I have a table cell that has is only supposed to be (for example) 50% wide, but has the word WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW in it, is there a way I could have that cut off and begin on a new line after it gets past the 50% mark?
|
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Nov 2005
Posts: 149
Rep Power: 4
![]() |
I was just thinking, is there some special character that acts as a space but doesn't appear? I could scatter it in longer words so it splits it and makes a new line when it needs to.
|
|
|
|
|
|
#3 |
|
Expert Programmer
|
This will do the trick:
word-wrap: break-word; antidisestablishmentarianism antidisestablish- mentarianism Last edited by titaniumdecoy; Apr 26th, 2006 at 1:47 AM. |
|
|
|
|
|
#4 |
|
Professional Programmer
Join Date: Mar 2005
Location: Student of University of Mumbai, Maharashtra State, India
Posts: 344
Rep Power: 4
![]() |
However, there's one problem with . Firefox, does not support it.
If you every tried this "Quick Reply" box, with a string having "NO SPACES" greater than 54 characters, there won't be a word wrap and the box would have a horizontal scroll bar!
__________________
Visit: http://www.somaiya.edu |
|
|
|
|
|
#5 |
|
Hobbyist Programmer
Join Date: Nov 2005
Posts: 149
Rep Power: 4
![]() |
Where would I put that in the table tag? something like this?
<table style='word-wrap:break-word;'> Because that's not working... |
|
|
|
|
|
#6 | |
|
Hobbyist Programmer
|
Quote:
what do you actualy put in the cell? are you sure this isnt an error. i think i have had this problem before. if the width is set auto word wrap should be implamented by the browser. that waht i think. i anit no HTML guru. |
|
|
|
|
|
|
#7 |
|
Expert Programmer
|
Writlaus, try using double quotes instead of single quotes.
|
|
|
|
|
|
#8 | |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Quote:
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
|
#9 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
Perhaps that style should be applied to <td>, the immediate parent of the text nodes in question? A quick way to affect them all would be through CSS.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
|
|
#10 |
|
Hobbyist Programmer
Join Date: Nov 2005
Posts: 149
Rep Power: 4
![]() |
I tried applying the style to <table>, <tr>, and <td>, all of which made no effect. And I tried the "voodoo" for kicks--that didn't work either, no big surprise.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|