table-anonymous-block-012.xht (2023B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: The anonymous block box around a table - table bottom margin is collapsed with caption bottom margin</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#model" /> 7 <meta name="flags" content="ahem" /> 8 <meta name="assert" content="The bottom margin of the table caption is not collapsed with bottom margin of the table when 'caption-side: bottom'." /> 9 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 10 <style type="text/css"> 11 #div1 12 { 13 border-bottom: 1em solid blue; 14 width: 10em; 15 } 16 table 17 { 18 margin-bottom: 5em; 19 border-spacing: 0; 20 font: 1em Ahem; 21 } 22 caption 23 { 24 background: black; 25 caption-side: bottom; 26 color: black; 27 margin-bottom: 10em; 28 width: 10em; 29 } 30 td 31 { 32 background: black; 33 color: black; 34 width: 10em; 35 } 36 #div2 37 { 38 background: blue; 39 height: 10em; 40 position: relative; 41 top: -11em; 42 width: 10em; 43 } 44 </style> 45 </head> 46 <body> 47 <p>Test passes if there are only two boxes below and there is space between the black box and the blue box.</p> 48 <div id="div1"> 49 <table> 50 <caption>Filler Text</caption> 51 <tr> 52 <td>Filler Text</td> 53 </tr> 54 </table> 55 </div> 56 <div id="div2"></div> 57 </body> 58 </html>