c5505-mrgn-001

margin

WeasyPrint

This browser

Flags
ahem

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: margin</title>
 5   <meta name="flags" content="ahem">
 6   <link rel="help" href="http://www.w3.org/TR/REC-CSS1#margin">
 7   <link rel="author" title="CSS1 Test Suite Contributors" href="http://www.w3.org/Style/CSS/Test/CSS1/current/tsack.html">
 8   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 9   <style type="text/css">
10    div.test, div.control { margin: 1em; }
11    p.criteria { color: navy; }
12    p, ul, li { margin: 0; padding: 0; list-style: none; }
13 
14    div.test { border: solid black; width: 10em; background-color: orange; font: 1em/1 Ahem; color: teal; }
15    ul.test, li.test { margin: 1em; }
16    li.test { background-color: aqua; }
17    ul.test { background-color: yellow; }
18 
19    .control { border: solid; width: 10em; background: red; }
20    .control .orange { border: solid 1em orange; background: yellow; }
21    .control .teal { height: 1em; width: 1em; background: teal; }
22    .control .aqua { border: solid 1em yellow; background: aqua; }
23 
24   </style>
25   <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#margin-properties" title="8.3 Margin properties: 'margin-top',  'margin-right',  'margin-bottom', 'margin-left', and 'margin'">
26  </head>
27  <body>
28   <p class="criteria">The following two diagrams should look identical.</p>
29   <div class="test">
30    <ul class="test">
31     <li>-</li>
32     <li class="test">-</li>
33     <li>-</li>
34    </ul>
35   </div>
36   <div class="control">
37    <div class="orange">
38     <div class="teal"></div>
39     <div class="aqua"><div class="teal"></div></div>
40     <div class="teal"></div>
41    </div>
42   </div>
43  </body>
44 </html>