empty-cells-exceptions-001

Cells containing floating content are not considered empty

WeasyPrint

This browser

Assertion
Cells that contain floating content, including empty elements, are not considered to be empty cells. The table under test actually contains two tests. The first cell tests floating content, and the second cell tests a floating empty element.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3     <head>
 4         <title>CSS Test: Cells containing floating content are not considered empty</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#empty-cells">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="Cells that contain floating content, including empty elements, are not considered to be empty cells. The table under test actually contains two tests. The first cell tests floating content, and the second cell tests a floating empty element.">
 9         <style type="text/css">
10             table
11             {
12                 background: red;
13                 border-spacing: 0;
14                 empty-cells: hide;
15             }
16             td
17             {
18                 background: green;
19                 color: green;
20             }
21             .float
22             {
23                 float: right;
24             }
25         </style>
26     </head>
27     <body>
28         <p>Test passes if there is no red visible on the page.</p>
29         <table>
30             <tr>
31                 <td>
32                     <div class="float">&nbsp;</div>
33                 </td>
34                 <td>FillerTextFillerText</td>
35             </tr>
36             <tr>
37                 <td>FillerTextFillerText</td>
38                 <td>
39                     <div class="float"></div>
40                 </td>
41             </tr>
42         </table>
43     </body>
44 </html>