| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or
g/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 elements wi
th percentage based intrinsic height that cannot be resolved and 'top' specified
</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-repla
ced-height" /> |
| 7 <link rel="match" href="absolute-replaced-height-014-ref.xht" /> |
| 8 |
| 9 <meta name="flags" content="" /> |
| 10 <meta name="assert" content="An absolutely positioned inline-block repla
ced element with a percentage height that cannot be resolved has no intrinsic he
ight." /> |
| 11 <!-- |
| 12 " |
| 13 (...) the height of the containing block of an absolutely |
| 14 positioned element is independent of the size of the element its
elf, |
| 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 unti
l |
| 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: auto; |
| 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> |
| OLD | NEW |