Fixed column width in HTML table

bertram

New Member
I have an HTML table that has rows added in a PHP loop. This is what the loop body looks like\[code\]<tr> <td style="width:220px"><?php echo $a; ?></td> <td style="width:150px"><?php echo $b; ?></td> <td style="width:70px"><?php echo $c; ?></td> <td style="width:70px"><?php echo $d; ?></td></tr>\[/code\]The problem is, when the contents in the second column of any row are slightly large, the width of the second column exceeds 150px, and to compensate the width of the first column reduces. How can I prevent that from happening. I want to widths to not change, and if the contents in any particular cell are too large to fit, the height should increase to accomodate.
 
Top