table-backgrounds-bs-row-002

background-position - table-row

WeasyPrint

This browser

Flags
image
Assertion
Positioning a background image on a table row positions it within a box that extends from the left edge of its leftmost table cell to the right edge of its rightmost tabel cell.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3  <head>
 4   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 5   <title>CSS Test: background-position - table-row</title>
 6   <link rel="author" title="James Hopkins" href="http://idreamincode.co.uk/css21testsuite">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#table-layers">
 8   <link rel="help" href="http://www.w3.org/TR/CSS21/colors.html#background-properties">
 9   <meta name="flags" content="image">
10   <meta name="assert" content="Positioning a background image on a table row     positions it within a box that extends from the left edge of its leftmost     table cell to the right edge of its rightmost tabel cell.">
11   <style type="text/css">
12   #test{
13   display:table;
14   width:500px;
15   }
16   .table-row{
17   background:url(support/swatch-red.png) repeat-y 50% 0;
18   display:table-row;
19   }
20   .table-cell{
21   display:table-cell;
22   height:100px;
23   }
24   .border-left{
25   border-left:8px solid green;
26   }
27   .border-right{
28   border-right:8px solid green;
29   }	
30   </style>
31  </head>
32  <body>
33   <p>To pass, there <strong>must not</strong> be any red below.</p>
34   <div id="test">
35    <div class="table-row">
36     <div class="table-cell border-right"></div>
37     <div class="table-cell border-left"></div>
38    </div>
39   </div>
40  </body>
41 </html>