absolute-replaced-height-021.xht (1943B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: Absolutely positioned inline-block replaced element with percentage based intrinsic height that cannot be resolved where 'top' and 'bottom' are not '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#abs-replaced-height" /> 7 <link rel="match" href="absolute-replaced-height-014-ref.xht" /> 8 9 <meta name="assert" content="An absolutely positioned inline-block replaced element with a percentage height that cannot be resolved has no intrinsic height." /> 10 11 <!-- 12 " 13 (...) the height of the containing block of an absolutely 14 positioned element is independent of the size of the element itself, 15 and thus a percentage height on such an element *_can always be 16 resolved_*. However, it may be that the height is not known until 17 elements that come later in the document have been processed. 18 " 19 http://www.w3.org/TR/CSS21/visudet.html#the-height-property 20 --> 21 22 <style type="text/css"> 23 div#containing-block 24 { 25 position: relative; 26 } 27 div div 28 { 29 border: solid green; 30 position: absolute; 31 top: 1in; 32 width: 300px; 33 } 34 iframe 35 { 36 border: solid red; 37 bottom: 1in; 38 position: absolute; 39 top: 1in; 40 width: auto; 41 } 42 </style> 43 </head> 44 <body> 45 <p>Test passes if there is <strong>no red</strong>.</p> 46 <div id="containing-block"> 47 <iframe height="50%"></iframe> 48 <div></div> 49 </div> 50 </body> 51 </html>