1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:48:11 +00:00
serenity/Tests/LibWeb/Layout/input/block-and-inline/abspos-without-insets.html
Aliaksandr Kalenik 4164af2ca4 LibWeb: Do not compensate padding for abspos boxes with static position
When a box does not have a top, left, bottom, or right, there is no
need to adjust the offset for positioning relative to the padding edge,
because the box remains in the normal flow.
2023-11-15 23:44:05 +01:00

20 lines
No EOL
363 B
HTML

<!DOCTYPE html><style>
* {
border: 1px solid black;
}
.box {
position: relative;
padding: 10px 50px 100px 20px;
background-color: mediumseagreen;
width: 200px;
height: 200px;
}
.inner {
position: absolute;
width : 100px;
height: 100px;
background-color: magenta;
}
</style><div class="box"><div class="inner"></div></div>