I should preface this by saying I have already tried several fixes found on this site for similar questions (such as Set the table column width constant regardless of the amount of text in its cells?) to no avail.
I am generating tables of user comments (1 comment per table) via AJAX. In brief, input of text and click of a button calls an AJAX function which accesses a php file; the php file then displays the user comments chronologically based on an algorithm I have developed. Works fine...(the most up to date relevant code follows)
$current.="<table border=\"1\" width=\"550px\" table-layout=\"fixed\">";
$current.="<tr width=\"550px\">";
$current.="<td width=\"60px\"><img src=\"" . $Picture1 . "\" style=\"float:left\"
width=\"50px\" style=\"border: 0\" height=\"55px\"></td>";
$current.="<td width=\"485px\">";
$current.="<div style=\"width:485px\"><font size = \"2\" style=\"font-
family:arial\">  <b>$user1</b></font>  ";
$current.="<font size = \"2\" style=\"font-family:arial\">$usercomment1</font>";
$current.="</div></td>";
$current.="</tr>";
$current.="</table>";
EXCEPT when the user comment exceeds the horizontal bounds (width) of the table (about 60 characters). Note that without the div in the table cell as shown above (and setting EVERY td, tr, and table element to a fixed width), the comment expands the bounds of the table to the right (revealed by showing the border). Amazingly, with the code above (that is, with the div included), the text of the user comment actually goes outside of the table (text actually simply writes over the right table border like it wasn't even there and keeps moving right, as if the div/text has a higher z-index).
Right now, my quick and dirty fix is to set maxlength='60' for the input text field of the form which generates the user comment, but I don't like this method, as limiting characters to 60 is like Twitter-lite. Any ideas on why my table issue is occurring?