Re: Specifying the width of table cells

Regarding TD and TH no longer allowing the WIDTH attribute,
At 03:13 PM 7/13/97 +0200, Arnoud "Galactus" Engelfriet wrote:

>Although it wasn't me who removed it ;-), I've always wondered why
>you'd want to set the width of *one* cell in a column. I can understand
>HEIGHT on a TR, but should WIDTH on, say, the last TD in a column
>apply to all earlier cells in that column too? That would require
>that the entire table is redrawn.

I agree with you here and in your later comments; one of the
main drawbacks to cell widths is that it requires a two-pass
algorithm to display a table.

However, since the HTML 4.0 spec does keep the two-pass algorithm
(and even has notes how to implement it), the big drawback to
not letting TD and TH take a WIDTH attribute is that many existing
tables for HTML 3.2 are no longer valid HTML 4.0 documents.

Since one goal of the new table model is backwards-compatibility,
I'm trying to understand why we need to remove the WIDTH attribute
now.  I could understand it better if the two-pass algorithm were
no longer in use.

                             * * *

One possible motivation is, as Arnoud suggests, the possibility
that cell widths were removed in the current HTML version so that
they could be reintroduced in a future version of HTML that allows
different rows to use different widths for each cells.

<TABLE border>
<TR>
<TD WIDTH=100>Foo
<TD WIDTH=200>Bar
<TR>
<TD WIDTH=50>Feebie
<TD WIDTH=250>Bletch
</TABLE>

might one day result in:

+------------------+---------------------------------------+
| Foo              | Bar                                   |
+---------+--------+---------------------------------------+
| Feebie  | Bletch                                         |
+---------+------------------------------------------------+

Given how complex the table model already is and the degree
of complexity required for browser algorithms, I'm not sure
if we want to open this can of worms any time soon.

I can't off-hand think of any tables that would require this
format for structural reasons.

However, some spreadsheet models (although not Excel's) 
and some word processing table models (notably Word's)
already include these types of mixed-cell-width tables.

Also, these types of tables can be duplicated (inelegantly)
by using two different tables, one after another; or by
dividing the table into three columns and judiciously
using COLSPAN if you aren't set on any particular column
width.

                             * * *

Anyway, the main point I wanted to bring up is that many
existing HTML 3.2 tables are no longer compatible with the
4.0 table model because they specify a WIDTH attribute for
a cell.
-- 
E. Stephen Mack <estephen@emf.net>
http://www.emf.net/~estephen/

Received on Sunday, 13 July 1997 20:56:02 UTC