Re: Table Backgrounds

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 UTC