width-inherit-001.xht (1297B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <title>CSS Test: Inheriting Explicit Widths</title> 6 <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/> 7 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-11-07 --> 8 <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#list-style"/> 9 <link rel="match" href="block-non-replaced-width-001-ref.xht" /> 10 11 12 <meta name="assert" content="The computed width is inherited, even if the 13 'width' property does not apply."/> 14 <style type="text/css"> 15 .outer { 16 width: 9.375em; /* 150px */ 17 } 18 .inner { 19 display: block; 20 width: inherit; 21 height: 1.875em; /* 30px */ 22 background: orange; 23 } 24 .control { 25 position: absolute; 26 top: 82px; 27 width: 9.375em; 28 height: 1.875em; 29 background: blue; 30 } 31 </style> 32 </head> 33 <body> 34 <p>Test passes if the orange and blue rectangles have the <strong>same width</strong>.</p> 35 36 <div><span class="outer"><span class="inner"></span></span></div> 37 <div class="control"></div> 38 </body> 39 </html>