| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/
DTD/xhtml11.dtd"> |
| 2 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 <head> |
| 4 <title>CSS Test: Absolute Replaced Elements: specified 'top' and 'bottom' with
auto margins</title> |
| 5 <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.ne
t/"/> |
| 6 <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#clipping"/> |
| 7 <link rel="match" href="../reference/ref-if-there-is-no-red.xht" /> |
| 8 |
| 9 <meta name="flags" content="image"/> |
| 10 <meta name="assert" content="If 'top' and 'bottom' are specified on an |
| 11 absolutely-positioned replaced element, then any remaining space is |
| 12 split amongst the 'auto' vertical margins."/> |
| 13 <style type="text/css"> |
| 14 .container { |
| 15 position: relative; |
| 16 width: 45px; |
| 17 height: 45px; |
| 18 /* Uncomment for debugging: |
| 19 border: solid silver; |
| 20 background: aqua; */ |
| 21 } |
| 22 .abspos { |
| 23 position: absolute; |
| 24 top: 0; bottom: 0; |
| 25 background: red; |
| 26 } |
| 27 .one { |
| 28 margin: auto; |
| 29 left: 0; |
| 30 } |
| 31 .two { |
| 32 margin-top: auto; |
| 33 left: 15px; |
| 34 } |
| 35 .three { |
| 36 margin-bottom: auto; |
| 37 right: 0; |
| 38 } |
| 39 .control1 { |
| 40 height: 15px; |
| 41 border-right: 15px solid red; |
| 42 } |
| 43 .control2 { |
| 44 height: 15px; |
| 45 border-left: 15px solid red; |
| 46 } |
| 47 .control3 { |
| 48 height: 15px; |
| 49 margin: 0 15px; |
| 50 background: red; |
| 51 } |
| 52 </style> |
| 53 </head> |
| 54 <body> |
| 55 <p>Test passes if there is <strong>no red</strong>.</p> |
| 56 <div class="container"> |
| 57 <img class="abspos one" src="support/swatch-white.png" alt="FAIL: image su
pport required"/> |
| 58 <img class="abspos two" src="support/swatch-white.png" alt="FAIL: image su
pport required"/> |
| 59 <img class="abspos three" src="support/swatch-white.png" alt="FAIL: image
support required"/> |
| 60 <div class="control1"></div> |
| 61 <div class="control2"></div> |
| 62 <div class="control3"></div> |
| 63 </div> |
| 64 </body> |
| 65 </html> |
| OLD | NEW |