word wrapping td's

ok so my table has a defined height so if its *possible*, when the text reaches the bottom can it autowrap to the next td? or maybe another workaround.<br />
<br />
i made a php script using wordwrap() kinda doing this but the br's would mess the whole thing up<!--content-->are you refering to wraping the text to another table's td or to take the text from one td and put it to another one in a horizontal way?<br />
<br />
i believe you are talking about doing:<br />
<br />
---------------------------------------------<br />
|these are the |sing the abcs |h i j k l m n |<br />
|words of my |for your |o p q r s t u|<br />
|sentence and |happy pleasure|v w x y z |<br />
|now... I will |a b c d e f g | |<br />
---------------------------------------------<br />
<br />
if so then the answer is no, tables don't do that...<br />
<br />
but you do have several options available to you<br />
<br />
if you set the table to:<br />
cellspacing="0" cellpadding="0" border="0"<br />
then you could nest tables within tables which often comes in handy for me...<br />
<br />
like:<br />
<br />
<table id="myOutSideMostTable" cellspacing="0" cellpadding="0" border="2"><br />
<tr><br />
<td><br />
<table id="myOutSideMostTable" cellspacing="0" cellpadding="0" border="0"><br />
<tr><br />
<td>table 1 content here</td><br />
</tr><br />
</table><br />
</td><br />
</tr><br />
<tr><br />
<td><br />
<table id="myOutSideMostTable" cellspacing="0" cellpadding="0" border="0"><br />
<tr><br />
<td>table 2 content here</td><br />
</tr><br />
</table><br />
</td><br />
</tr><br />
<tr><br />
<td><br />
<table id="myOutSideMostTable" cellspacing="0" cellpadding="0" border="0"><br />
<tr><br />
<td>table 3-A content here</td><br />
<td>table 3-B content here</td><br />
</tr><br />
<tr><br />
<td><br />
</td><br />
<td>table 3-C content here</td><br />
<td>table 3-D content here</td><br />
</tr><br />
</table><br />
</td><br />
</tr><br />
</table><br />
<br />
<br />
hope that at least helps a little for you...<!--content-->BUT, if you made the text all one line<br />
<br />
gggggggggggggggggggggggggggggggggg<br />
<br />
that will not wrap. the text has to have a break in it. you can use strlen() in php to cut the string to a certain size but then it gets messed up.<!--content-->what i had in mind was this..<br />
<br />
<br />
$newtext = wordwrap($file, 500, "</td><td>")<br />
<br />
<br />
so under this, a new td will be created after 500 characters, and the rest of the text will be wrapped on to the other td also. but say i had a couple br's in there, this would stretch the defined height that i already put in. <br />
<br />
just stretching the limits of php and html, if there's no solution, it's all right.<!--content-->than just count how many characters you have in the string and then break it up and insert them into another cell. but the more cells you have the more wrapping it does. don't make since to add another cell if the word is too long. just break it to another line.<!--content-->this will mainly be based on like a news script not just a string containing words. and the function doesnt break at exactly 500 characters unless its 500+ character word, hence the name wordwrap instead of using split() etc<!--content-->
 
Back
Top