[html5] empty cells

Ricardo Tomasi ricardobeat at gmail.com
Mon Mar 21 16:10:00 PDT 2011


This must be the most semantic menu ever ;)

Have you tried setting the colspan attribute (colspan="3") on the <th>? You
must explicitly tell the cell to occupy the space where other 2 cells are
expected.

http://dev.w3.org/html5/spec-author-view/tabular-data.html#attributes-common-to-td-and-th-elements

2011/3/20 webmaster <webmaster at tsmchughs.com>

> I'm seeing what I think is a bug in Safari with regard to empty cells in a
> table. I have a restaurant dinner menu marked up as a table:
>
> http://www.tenmercer.com/menu/dinner
>
> The first <tr> of each <tbody> element contains only a <th> element (thanks
> to hixie for the scope="rowgroup" suggestion a couple of weeks ago). Each
> subsequent <tr> has 3 cells: a <th> and two <td>s. My style sheet has a rule
> to place a border-bottom on tbody tr:first-child. In Firefox, the border
> extends across the table, but not in Safari.
>
> "Calculating the number of columns in a table" from the html 4 spec
> http://www.w3.org/TR/html401/struct/tables.html#h-11.2.4.3
> says "user agents should base the number of columns on what is required by
> the rows" when there is no <col> or <colgroup> elements.
>
> I actually tried inserting both <col> and <colgroup> elements, with no
> change. But if I explicitly add empty <td> elements, as in this menu
>
> http://www.tenmercer.com/menu/glutenfree
>
> then the border extends, even in Safari.
>
> I tried to find something in the html5 spec, but I'm having trouble
> deciphering
>
> http://dev.w3.org/html5/spec/Overview.html#table-model
>
> Is there something more recent regarding how browsers should calculate the
> number of cells in a table?
>
> --
> Brian T
> _______________________________________________
> Help mailing list
> Help at lists.whatwg.org
> http://lists.whatwg.org/listinfo.cgi/help-whatwg.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/help-whatwg.org/attachments/20110321/3c146429/attachment-0002.htm>


More information about the Help mailing list