c5505-mrgn-001.xht (2025B)
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: 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 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-03-29 --> 10 <link rel="match" href="c5505-mrgn-001-ref.xht" /> 11 12 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 13 <style type="text/css"><![CDATA[ 14 div.control { margin: 1.25em; } 15 p.criteria { color: navy; } 16 p, ul, li { margin: 0; padding: 0; list-style: none; } 17 18 div.test { border: solid black; width: 10em; background-color: orange; font: 1.25em/1 Ahem; color: teal; margin: 1em; } 19 ul.test, li.test { margin: 1em; } 20 li.test { background-color: aqua; } 21 ul.test { background-color: yellow; } 22 23 .control { border: solid; width: 12.5em; background: red; } 24 .control .orange { border: solid 1.25em orange; background: yellow; } 25 .control .teal { height: 1.25em; width: 1.25em; background: teal; } 26 .control .aqua { border: solid 1.25em yellow; background: aqua; } 27 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 class="criteria">The following two diagrams should look identical.</p> 33 <div class="test"> 34 <ul class="test"> 35 <li>-</li> 36 <li class="test">-</li> 37 <li>-</li> 38 </ul> 39 </div> 40 <div class="control"> 41 <div class="orange"> 42 <div class="teal"></div> 43 <div class="aqua"><div class="teal"></div></div> 44 <div class="teal"></div> 45 </div> 46 </div> 47 </body> 48 </html>