block-non-replaced-height-016.xht (1734B)
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: A relative positioned child elements' offset is ignored for 'height' on a block-level non-replaced elements in normal flow when 'overflow' does not compute to 'visible'</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="A relative positioned child elements' offset is not considered when sizing the 'height' of a block-level non-replaced element is in normal flow." /> 8 <style type="text/css"> 9 html, body 10 { 11 overflow: scroll; 12 } 13 #div1 14 { 15 position: relative; 16 } 17 #div2 18 { 19 background: blue; 20 } 21 #div2 div 22 { 23 position: relative; 24 top: 1in; 25 } 26 #div3 27 { 28 background: orange; 29 left: 1in; 30 position: absolute; 31 top: 0; 32 } 33 #div2 div, #div3 34 { 35 height: 1in; 36 } 37 div div 38 { 39 width: 1in; 40 } 41 </style> 42 </head> 43 <body> 44 <p>Test passes if the blue and orange boxes below are the same height.</p> 45 <div id="div1"> 46 <div id="div2"> 47 <div></div> 48 </div> 49 <div id="div3"></div> 50 </div> 51 </body> 52 </html>