root-box-002

Styling the root element: display:table

WeasyPrint

This browser

Flags
image
Assertion
HTML elements can be set to other display property values - like sub-table elements just like in this testcase - in order to behave like another 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: 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="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/root/002.html" type="text/html">
 8   <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#display-prop">
 9   <meta name="flags" content="image">
10   <meta name="assert" content="HTML elements can be set to other display     property values - like sub-table elements just like in this testcase -     in order to behave like another element.">
11   <style type="text/css">
12    * { display: none; padding: 0; border: 0; margin: 0; width: auto; height: auto; }
13    html:before { content: "There should be a single unbroken yin-yang symbol below.";
14                  display: table-caption; margin: 0 auto -1.2em; padding: .1em;
15                  min-height: 1em;
16                  background: white; color: black; }
17    html { display: table; border-spacing: 0; margin: 0 auto;
18           border-top: 1em solid red; }
19    head, body { display: table-row; }
20    div, style[title] { display: table-cell; width: 100px; height: 100px; }
21    [title="tl"] { background: url(support/test-tl.png); }
22    [title="tr"] { background: url(support/test-tr.png); }
23    .bl { background: url(support/test-bl.png); }
24    .br { background: url(support/test-br.png); }
25   </style>
26   <style title="tl" type=""></style>
27   <style title="tr" type=""></style>
28  </head>
29  <body>
30   <div class="bl"></div>
31   <div class="br"></div>
32  </body>
33 </html>