|
1 <!DOCTYPE html> |
|
2 <!-- Any copyright is dedicated to the Public Domain. |
|
3 - http://creativecommons.org/publicdomain/zero/1.0/ --> |
|
4 <html> |
|
5 <head> |
|
6 <title>CSS Test: Sticky Positioning - absolute containing block</title> |
|
7 <link rel="author" title="Corey Ford" href="mailto:cford@mozilla.com"> |
|
8 <link rel="match" href="containing-block-1-ref.html"> |
|
9 <meta name="assert" content="Sticky positioned elements should establish a containing block for absolutely positioned descendants"> |
|
10 <style> |
|
11 body { |
|
12 height: 200px; |
|
13 margin: 0; |
|
14 } |
|
15 #sticky { |
|
16 position: sticky; |
|
17 top: 100px; |
|
18 height: 10px; |
|
19 background-color: black; |
|
20 } |
|
21 #absolute { |
|
22 position: absolute; |
|
23 top: 5px; |
|
24 left: 5px; |
|
25 width: 10px; |
|
26 height: 10px; |
|
27 background-color: blue; |
|
28 } |
|
29 </style> |
|
30 <body> |
|
31 <div id="sticky"> |
|
32 <div id="absolute"></div> |
|
33 </div> |
|
34 </body> |
|
35 </html> |