padding-007.xht (1822B)
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 inheriting three 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-007-ref.xht" /> 10 11 <meta name="assert" content="The 'padding' property set to 'inherit' and inheriting three values." /> 12 <style type="text/css"> 13 #wrapper 14 { 15 padding: 96px 24px 72px; 16 position: relative; 17 } 18 #div1 19 { 20 border: 10px solid green; 21 left: 0; 22 padding: inherit; 23 position: absolute; 24 top: 0; 25 } 26 #div2 27 { 28 border: 10px solid green; 29 height: 96px; 30 width: 288px; 31 } 32 #reference 33 { 34 border: 10px solid red; 35 height: 284px; 36 left: 0; 37 position: absolute; 38 top: 0; 39 width: 356px; 40 } 41 </style> 42 </head> 43 <body> 44 <p>Test passes if there is <strong>no red</strong>.</p> 45 <div id="wrapper"> 46 <div id="reference"></div> 47 <div id="div1"> 48 <div id="div2"></div> 49 </div> 50 </div> 51 </body> 52 </html>