W3C home > Mailing lists > Public > www-style@w3.org > June 2001

Re: Table Backgrounds

From: Tim Bagot <tsb-w3-style-0003@earth.li>
Date: Tue, 26 Jun 2001 15:18:46 +0000 (UTC)
To: <www-style@w3.org>
Message-ID: <Pine.LNX.4.33.0106261437490.1183-100000@windle.hack>
At 2001-06-26T10:08-0400, fantasai wrote:-

> image.asc -
>
>   ___________________________________________
>  |\   \   \    \    \  |  /    /    /   /   /|
>  | \   \   \    \    \ | /    /    /   /   / |
>  |---------------------+---------------------|
>  | /   /   /    /    / | \    \    \   \   \ |
>  |/___/___/____/____/__|__\____\____\___\___\|
>
> table.html -
>
>  <title>Table</title>
>  <link rel="stylesheet" type="text/css" href="stylesheet.css">
>
>  <table>
>    <tr>
>      <td>&nbsp;</td>
>      <td>&nbsp;</td>
>      <td>&nbsp;</td>
>    </tr>
>  </table>
>
> stylesheet.css -
>
>  table {border-collapse: separate;}
>  tr {background: url(image.asc) 50% 50% no-repeat;}
>
> Rendering?
>
>  A)
>     .............................................
>     : ............. ............. ............. :
>     : :   \ | /   : :   \ | /   : :   \ | /   : :
>     : :-----+-----: :-----+-----: :-----+-----: :
>     : :.../.|.\...: :.../.|.\...: :.../.|.\...: :
>     :...........................................:

No, because the background property is set on tr, not td.

>  B)
>     .............................................
>     : ............. ............. ............. :
>     : :   \   \   :\:   \ | /   :/:   /   /   : :
>     :-:-----------:-:-----+-----:-:-----------:-:
>     : :.../.../...:/:.../.|.\...:\:...\...\...: :
>     :...........................................:

Yes, if td is transparent (the default). Or, not quite: because row boxes
together cover the whole table, the image should extend into the vertical
spacing too. So, D. (If there were multiple rows, I assume that inter-row
spacing would be split equally between its rows.)

>  C)
>     .............................................
>     : ............. ............. ............. :
>     : :   \   \   : :   \ | /   : :   /   /   : :
>     : :-----------: :-----+-----: :-----------: :
>     : :.../.../...: :.../.|.\...: :...\...\...: :
>     :...........................................:

But you get this instead if 17.6.1 is really correct in saying that the
spacing receives the background of the table element. This seems unlikely,
since then the row boxes would not only not cover the whole table, but
also not be single boxes, if the layered transparency model is to be at
all meaningful. In either case, some clarification is probably needed.

>  D)
>     None of the above.

See above (B). Another possibility is that the cells are not transparent,
in which case the image will be visible in all of the spacing, but not in
the cells.


Tim Bagot
Received on Tuesday, 26 June 2001 11:18:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:09 GMT