Page 1 of 1

controlling table length

Posted: Tue May 10, 2005 7:58 am
by pleigh
if i have a table with a length of

Code: Select all

------------
|          |
------------
and i have a word, a very long word, or let's say an email address like

thisisalongemailaddress@someemailaddress.com

the tendency of the table is to adjust the length to accomodate the characters of the word or email address, looking like

--------------------------------------------
thisisalongemailaddress@someemailaddress.com|
--------------------------------------------

now, my question, is there a way i can control this?i mean, if the first table is the length of my table, iserted a long word, the length of the table will not adjust and the remaining letters will automatically goes to the next line...is it possible??if yes, how??

thanks in advance

Posted: Tue May 10, 2005 10:11 am
by pickle
It's not possible to split up a word like that with just HTML. A string like that is treated as 1 word, so HTML won't split it. You could use the PHP function wordwrap() to break it up, or use Javascript to insert a <br /> after a certain number of characters, after parsing through it.

Posted: Thu May 12, 2005 1:09 am
by s.dot
You could use overflow:auto but I believe it would just scroll it, instead of wrapping it to the next line.