Re: colspan doubt

"Gabriel Rivera" <gabrielrivera@ciudad.com.ar> wrote:

> I'm working with tables, and have a problem
> How do I make this work??
> This is the example:
>
> <TABLE BORDER=0 width=100%>
> <TR>
> <TD COLSPAN="3">
> blah blah blah
> </TD>
> </TR>
>
> <TR>
> <TD width=50% colspan=????>blah</td>
> <TD width=50% colspan=????>blah</td>
> </TR>
>
> <TR>
> <TD width=33%></TD>
> <TD width=33%></TD>
> <TD width=33%></TD>
> </TR>
>
> </TABLE>
>
> Thanks a LOT.

You can _try_ with this (slight modifications: middle column 34%, content
in last row):

<TABLE BORDER=0 WIDTH="100%">
<COLGROUP>
<COL WIDTH="33%">
<COL WIDTH="17%">
<COL WIDTH="17%">
<COL WIDTH="33%">
</COLGROUP>
<TR>
<TD COLSPAN=4>blah blah blah</TD>
</TR>

<TR>
<TD COLSPAN=2>blah</TD>
<TD COLSPAN=2>blah</TD>
</TR>

<TR>
<TD COLSPAN=1>foo</TD>
<TD COLSPAN=2>foo</TD>
<TD COLSPAN=1>foo</TD>
</TR>
</TABLE>

Part of the problem is that you can't have percentages on TD WIDTHs.  You
can only have them in COLs, COLGROUPs, and TABLE.

Another is that Netscape will ignore COLs and COLGROUPs (except it insists
the latter wrap the former).

Lastly, for Netscape, nothing is really fixing the size of the middle two
columns, even if you did provide WIDTHs for the TD tags.  If a column
doesn't contain at least one cell that does not span multiple columns, that
column has a width of zero.  It's seen as an empty column.  The space that
would seem to be implied would be set for those columns would instead be
given to one or more other columns.

Always remember that anything you put in an HTML file for presentational
rendering is only a suggestion which the browser is free to override or
ignore.  There is no control, there is no force.

Received on Thursday, 23 December 1999 12:42:03 UTC