blob: 7ad5eb82b581b5285543c091396d530192d08c9e [file] [log] [blame]
<!DOCTYPE html>
| This test ensures that an element with a non-positioned stacking context
| above its fixed position containing block will have its offset from the
| containing block calculated correctly. The results should display the blue
| block directly under the green block.
body {
font-family: Roboto;
font-size: 16px;
.positioned-stacking-context {
position: absolute;
opacity: .9;
width: 300px;
height: 50px;
margin-left: 40px;
.fixed-container {
position: fixed;
width: 300px;
height: 50px;
background-color: rgb(15, 157, 88);
.positioned-element {
position: absolute;
z-index: 1;
width: 300px;
height: 20px;
top: 60px;
background-color: rgb(66, 133, 244);
<div class="positioned-stacking-context">
<div class="fixed-container">
<div class="positioned-element"></div>