padding-004.xht (1941B)
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: Padding set using four values</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-21 --> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#propdef-padding" /> 8 <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#padding-properties" /> 9 <link rel="match" href="padding-004-ref.xht" /> 10 11 <meta name="assert" content="The 'padding' property set using three values properly assigns the first value to the top padding, the second value to the left padding, the third value to the bottom padding, and the fourth value to the right padding." /> 12 <style type="text/css"> 13 #wrapper 14 { 15 position: relative; 16 } 17 #div1 18 { 19 border: 10px solid green; 20 left: 0; 21 padding: 96px 48px 72px 24px; 22 position: absolute; 23 top: 0; 24 } 25 #div2 26 { 27 border: 10px solid green; 28 height: 96px; 29 width: 288px; 30 } 31 #reference 32 { 33 border: 10px solid red; 34 height: 284px; 35 left: 0; 36 position: absolute; 37 top: 0; 38 width: 380px; 39 } 40 </style> 41 </head> 42 <body> 43 <p>Test passes if there is <strong>no red</strong>.</p> 44 <div id="wrapper"> 45 <div id="reference"></div> 46 <div id="div1"> 47 <div id="div2"></div> 48 </div> 49 </div> 50 </body> 51 </html>