block-non-replaced-height-015.xht (1641B)
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' computes 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 #div1 10 { 11 position: relative; 12 } 13 #div2 14 { 15 background: blue; 16 } 17 #div2 div 18 { 19 position: relative; 20 top: 1in; 21 } 22 #div3 23 { 24 background: orange; 25 left: 1in; 26 position: absolute; 27 top: 0; 28 } 29 #div2 div, #div3 30 { 31 height: 1in; 32 } 33 div div 34 { 35 width: 1in; 36 } 37 </style> 38 </head> 39 <body> 40 <p>Test passes if the blue and orange boxes below are the same height.</p> 41 <div id="div1"> 42 <div id="div2"> 43 <div></div> 44 </div> 45 <div id="div3"></div> 46 </div> 47 </body> 48 </html>