W3C home > Mailing lists > Public > www-style@w3.org > November 2011

Re: [CSS21] 17.5.2.1 Fixed table layout and percentages

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Thu, 17 Nov 2011 12:51:21 +0100
Message-ID: <4EC4F539.4010306@kozea.fr>
To: www-style@w3.org
Le 17/11/2011 00:30, "Gérard Talbot" a écrit :
> No, table-column elements are not allowed to be anywhere in HTML table.
> Their declaration should follow optional<caption>  and precede optional
> <thead>:
>
> <!ELEMENT TABLE - -
>       (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>

Elements that have `display: table-column` are not always col elements, 
and vice versa. Even with col elements, illegal HTML documents do exist. 
I did not find what to do with elements in the wrong order in the HTML 
specs.

> For the purpose of section 17.5.2.1, I believe the number of columns in a
> table is defined by the number of table-cell elements in first row and not
> by the number of declared table-column elements.
>
> <table>
>   <col>
>   <tr>
>    <td></td><td></td>
>   </tr>
> </table>
> is a 2 column table even though only 1<col>  element is declared.
>
>
> If there are more column elements than table-cell elements in first row,
> then resulting layout is undefined IMO.

Found it:

     If a subsequent row has more columns than the greater of the number 
determined by the table-column elements and the number determined by the 
first row, then additional columns may not be rendered.

This implies that the number of columns for the table is defined the 
same way.

Regards,
-- 
Simon Sapin
Received on Thursday, 17 November 2011 11:51:55 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:46 GMT