root-box-002.xht (1957B)
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: Styling the root element: display:table</title> 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 6 <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact" /> 7 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-07-01 --> 8 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/root/002.html" type="text/html"/> 9 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#display-prop" /> 10 <link rel="match" href="root-box-002-ref.xht" /> 11 12 <meta name="flags" content="image"/> 13 <meta name="assert" content="HTML elements can be set to other display 14 property values - like sub-table elements just like in this testcase - 15 in order to behave like another element."/> 16 <style type="text/css"> 17 * { display: none; padding: 0; border: 0; margin: 0; width: auto; height: auto; } 18 html:before { content: "There should be a single unbroken yin-yang symbol below."; 19 display: table-caption; margin: 0 auto -1.2em; padding: .1em; 20 min-height: 1em; 21 background: white; color: black; } 22 html { display: table; border-spacing: 0; margin: 0 auto; 23 border-top: 1em solid red; } 24 head, body { display: table-row; } 25 div, style[title] { display: table-cell; width: 100px; height: 100px; } 26 [title="tl"] { background: url(support/test-tl.png); } 27 [title="tr"] { background: url(support/test-tr.png); } 28 .bl { background: url(support/test-bl.png); } 29 .br { background: url(support/test-br.png); } 30 </style> 31 <style title="tl" type=""></style> 32 <style title="tr" type=""></style> 33 </head> 34 <body> 35 <div class="bl"></div> 36 <div class="br"></div> 37 </body> 38 </html>