blob: aec32c835716e92b1236aac5ae5d45e8ed5b5b2e [file] [log] [blame]
<!DOCTYPE html>
| This test checks that an element is positioned relative to the viewport
| despite the presence of an absolute containing block in the element's
| ancestor chain.
.non-absolute-container {
width: 50px;
height: 50px;
margin-top: 10px;
margin-left: 10px;
background-color: rgb(100, 255, 100);
.absolute-container {
position: absolute;
width: 200px;
height: 200px;
background-color: rgb(255, 100, 100);
.fixed-element {
position: fixed;
width: 50px;
height: 50px;
top: 25px;
left: 25px;
background-color: rgb(100, 100, 255);
<div class="non-absolute-container"></div>
<div class="non-absolute-container">
<div class="absolute-container">
<div class="fixed-element">