block-non-replaced-height-004.xht (1546B)
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: Block-level non-replaced elements in normal flow when 'overflow' does not compute to 'visible' and 'height' is 'auto'</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#normal-block" /> 7 <meta name="assert" content="The 'height' is the 'height' of the child block box when a block-level non-replaced element is in normal flow and 'overflow' does not compute to 'visible'." /> 8 <style type="text/css"> 9 html, body 10 { 11 overflow: scroll; 12 } 13 div 14 { 15 position: relative; 16 } 17 div div 18 { 19 width: 1in; 20 } 21 #div1 div 22 { 23 background: blue; 24 height: 2in; 25 } 26 #div2 27 { 28 background: orange; 29 height: 2in; 30 left: 1in; 31 position: absolute; 32 top: 0; 33 } 34 </style> 35 </head> 36 <body> 37 <p>Test passes if the blue and orange boxes below are the same height.</p> 38 <div> 39 <div id="div1"> 40 <div></div> 41 </div> 42 <div id="div2"></div> 43 </div> 44 </body> 45 </html>