|
1 <!DOCTYPE html> |
|
2 <html class="reftest-wait"> |
|
3 <head> |
|
4 <!-- Note: CSS 2.1 allows guessing the static position of an absolutely |
|
5 positioned element whose offsets are 'auto' (initial value), i.e. |
|
6 the reference of this test is just one of many possible outcomes. |
|
7 See http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width --> |
|
8 <style type="text/css"> |
|
9 #in-flow-top { |
|
10 height: 20px; |
|
11 margin-bottom: 20px; |
|
12 background-color: green; |
|
13 } |
|
14 #abs-pos { |
|
15 width: 20px; height: 20px; |
|
16 background-color: blue; |
|
17 margin-top: 10px; |
|
18 margin-bottom: 10px; |
|
19 } |
|
20 #in-flow-bottom { |
|
21 height: 20px; |
|
22 margin-top: 20px; |
|
23 background-color: lightgreen; |
|
24 } |
|
25 </style> |
|
26 <script type="text/javascript"> |
|
27 function test() { |
|
28 document.getElementById('abs-pos').style.position = 'absolute'; |
|
29 document.documentElement.removeAttribute('class'); |
|
30 } |
|
31 document.addEventListener('MozReftestInvalidate', test, false); |
|
32 </script> |
|
33 </head> |
|
34 <body> |
|
35 <div id="in-flow-top"></div> |
|
36 <div id="abs-pos"></div> |
|
37 <div id="in-flow-bottom"></div> |
|
38 </body> |
|
39 </html> |