table-anonymous-objects-210.xht (1742B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: anonymous table cell and white space separating inline elements</title> 5 <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" /> 6 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes" title="17.2.1 Anonymous table objects" /> 8 <link rel="bookmark" href="http://lists.w3.org/Archives/Public/public-css-testsuite/2013Aug/0028.html" title="Browser non-interop on basic anonymous table boxes" /> 9 <meta name="assert" content="Anonymous table objects are automatically generated by UAs when a table element is missing necessary sub-table elements (like table-row or table-cell). In this test, an anonymous table-row and one anonymous table-cell will be created around the inline elements. This test checks that each white space separating the 3 span elements are preserved." /> 10 11 <style type="text/css"><![CDATA[ 12 div#rel-pos-wrapper 13 { 14 font-size: 2em; 15 position: relative; 16 } 17 18 div#test-overlapping-green 19 { 20 color: green; 21 display: table; 22 position: absolute; 23 top: 0; 24 z-index: 2; 25 } 26 27 div#reference-overlapped-red 28 { 29 color: red; 30 position: relative; 31 z-index: 1; 32 } 33 ]]></style> 34 35 </head> 36 37 <body> 38 39 <p>There should be no red below, except for antialiasing issues.</p> 40 41 <div id="rel-pos-wrapper"> 42 43 <div id="test-overlapping-green"> 44 <span>a</span> <span>bc</span> <span>d</span> 45 </div> 46 47 <div id="reference-overlapped-red"> 48 a bc d 49 </div> 50 51 </div> 52 53 </body> 54 </html>