Forum Moderators: open

Message Too Old, No Replies

Autoscaling table cells

Problem with the middle column

         

Philarmon

11:58 am on Aug 24, 2003 (gmt 0)

10+ Year Member



Hi!

I have a table with 3 columns: the left and right one should be 5 pix in width and the middle one should autoscale depending on the width of the screen. Everything works fine when there is a lot of text in the middle column. But if there is no text or just one word, the side columns become about 40 pix in width!

How can i fix the width of the side columns and let the middle column fill out the rest of the screen?

here is my code so far:

<TABLE width="100%" border=0 cellspacing=0 cellpadding=0 align=center>
<tr>
<td width=5 class=bgl><img src=a.gif></td>

<td>
text goes here
</td>

<td width=5 class=bgl><img src=a.gif></td>
</tr>
</table>

Thank you!
Philarmon

Jeff_H

5:48 pm on Aug 24, 2003 (gmt 0)

10+ Year Member



Just set the middle column to 100%.

<TABLE width="100%" border=0 cellspacing=0 cellpadding=0 align=center>
<tr>
<td width=5 class=bgl><img src=a.gif></td>

<td width=100%>
text goes here
</td>

<td width=5 class=bgl><img src=a.gif></td>
</tr>
</table>