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-bottom</title>
5 <meta name="flags" content="ahem">
6 <link rel="help" href="http://www.w3.org/TR/REC-CSS1#margin-bottom">
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 .test { font: 10px/1 Ahem; width: 10em; border: solid black; padding: 0; background: yellow; color: orange; }
11 .zero {background-color: teal; margin-bottom: 0;}
12 .one {margin-bottom: 5.29166mm; background-color: aqua;}
13 .two {margin-bottom: 20px; background-color: blue;}
14 .three {margin-bottom: 2em; background-color: aqua;}
15 .four {margin-bottom: 20%; background-color: teal;}
16 .five {margin-bottom: 20px;}
17 .six {margin-bottom: -10px; background-color: aqua;}
18 p, ul, li {margin: 0; padding: 0; list-style:none;}
19
20 .control { border: solid black; padding: 0; background: red; }
21 .control .teal { background: teal; }
22 .control .aqua { background: aqua; }
23 .control .blue { background: blue; }
24 .control .yellow { background: yellow; }
25 .control .long { width: 70px; height: 10px; background: orange; }
26 .control .short { width: 40px; height: 10px; background: orange; }
27 .control .blank { width: 100px; height: 20px; }
28 </style>
29 <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'">
30 </head>
31 <body>
32 <p>The two diagrams below should be identical, with no red present.</p>
33 <table>
34 <tr>
35 <td class="test">
36 <p class="zero">
37 xxxxxxx
38 </p>
39 <p class="zero">
40 xxxx
41 </p>
42 <p class="one">
43 xxxxxxx xxxx
44 </p>
45 <p class="two">
46 xxxxxxx xxxx
47 </p>
48 <p class="three">
49 xxxxxxx xxxx
50 </p>
51 <p class="four">
52 xxxxxxx xxxx
53 </p>
54 <ul class="two">
55 <li>xxxxxxx</li>
56 <li>xxxx</li>
57 <li class="five">xxxxxxx</li>
58 <li>xxxx</li>
59 </ul>
60 <p class="zero">
61 xxxxxxx xxxx
62 </p>
63 <p class="six">
64 xxxxxxx xxxx
65 </p>
66 <p class="zero">
67 xxxx
68 </p>
69 </td>
70 <td class="control">
71 <div class="teal"><div class="long"></div><div class="short"></div></div>
72 <div class="aqua"><div class="long"></div><div class="short"></div></div>
73 <div class="yellow"><div class="blank"></div></div>
74 <div class="blue"><div class="long"></div><div class="short"></div></div>
75 <div class="yellow"><div class="blank"></div></div>
76 <div class="aqua"><div class="long"></div><div class="short"></div></div>
77 <div class="yellow"><div class="blank"></div></div>
78 <div class="teal"><div class="long"></div><div class="short"></div></div>
79 <div class="yellow"><div class="blank"></div></div>
80 <div class="blue"><div class="long"></div><div class="short"></div><div class="long"></div></div>
81 <div class="blue"><div class="blank"></div></div>
82 <div class="blue"><div class="short"></div></div>
83 <div class="yellow"><div class="blank"></div></div>
84 <div class="teal"><div class="long"></div><div class="short"></div></div>
85 <div class="aqua"><div class="long"></div></div>
86 <div class="teal"><div class="short"></div></div>
87 </td>
88 </tr>
89 </table>
90 </body>
91 </html>