margin-001.xht (1747B)
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: Margin set using a single value</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-13 --> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#propdef-margin" /> 8 <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#margin-properties" /> 9 <link rel="match" href="margin-001-ref.xht" /> 10 11 <meta name="assert" content="The 'margin' property set using a single value properly assigns the same value to all sides." /> 12 <style type="text/css"> 13 #wrapper 14 { 15 position: relative; 16 } 17 #div1, #div2 18 { 19 border: 10px solid green; 20 } 21 #div1, #reference 22 { 23 left: 0; 24 position: absolute; 25 top: 0; 26 } 27 #div2 28 { 29 margin: 2.54cm; 30 height: 1in; 31 width: 3in; 32 } 33 #reference 34 { 35 border: 10px solid red; 36 height: 308px; 37 width: 500px; 38 } 39 </style> 40 </head> 41 <body> 42 <p>Test passes if there is <strong>no red</strong>.</p> 43 <div id="wrapper"> 44 <div id="reference"></div> 45 <div id="div1"> 46 <div id="div2"></div> 47 </div> 48 </div> 49 </body> 50 </html>