Forum Moderators: not2easy
I have another row, with one <TD> tag, colspan of 2. Now, how can I make the first column be just wide enough to support the text, while the other one stretches to fit the excess width the lower part takes up?
For you vision-oriented programmers (probably most of you in CSS are) out there, an example:
<table>
<TR>
<TD bgcolor=green>
Top left
</TD>
<TD bgcolor=red></TD>
</TR>
<TR>
<TD colspan=2>
hello there, guys at CSS! See what I mean? The left stretches, rather than the right. How can I fix it so the second column stretches, leaving the left column at its minimum width?
</TD>
</TR>
</table>
CSS:
table {width: 100%; table-layout: fixed;}
td.topleft {background: #0f0; width: 100px;} /* set top left cell's fixed width here */
td.topright {background: #f00;}HTML:
<table>
<tr>
<td class="topleft">Top left</td>
<td class="topright">Top Right</td>
</tr>
<tr>
<td colspan="2" >loads of text..... ........... .......... ...........</td>
</tr>
</table>