blob: f250998d9404a3e52f96981b61d14ff01f859202 [file] [log] [blame]
<!DOCTYPE html>
| This test checks that percentage values used for left/top on relatively
| positioned elements is calculated relative to the element's parent
| element (and not, for example, an absolute containing block).
.container {
width: 100px;
height: 150px;
background-color: rgb(100, 255, 100);
.box {
width: 50px;
height: 50px;
background-color: rgb(100, 100, 255);
.position-relative {
position: relative;
left: 25px;
top: 25px;
background-color: rgb(255, 100, 100);
<div class="container">
<div class="box"></div>
<div class="box position-relative"></div>
<div class="box"></div>