zimmermann@webkit.org | ac68af4 | 2011-06-15 08:02:37 +0000 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>CSS Test: Absolute replaced elements with percentage based intrinsic height that cannot be resolved where 'top', 'bottom', 'margin-top' 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 | <meta name="flags" content=""> |
| 8 | <meta name="assert" content="An absolutely positioned replaced element with a percentage height that cannot be resolved has no intrinsic height."> |
| 9 | <style type="text/css"> |
| 10 | #div1 |
| 11 | { |
| 12 | position: relative; |
| 13 | } |
| 14 | div div |
| 15 | { |
| 16 | border: solid green; |
| 17 | position: absolute; |
| 18 | top: 1in; |
| 19 | width: 300px; |
| 20 | } |
| 21 | iframe |
| 22 | { |
| 23 | border: solid red; |
| 24 | bottom: 1in; |
| 25 | margin-bottom: auto; |
| 26 | margin-top: 0.5in; |
| 27 | position: absolute; |
| 28 | top: 0.5in; |
| 29 | width: auto; |
| 30 | } |
| 31 | </style> |
| 32 | </head> |
| 33 | <body> |
| 34 | <p>Test passes if there is no red visible on the page.</p> |
| 35 | <div id="div1"> |
| 36 | <iframe height="50%"></iframe> |
| 37 | <div></div> |
| 38 | </div> |
| 39 | </body> |
| 40 | </html> |