mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:08:12 +00:00

If a box has a negative margin-left, it may have a negative effective offset within its parent BFC root coordinate system. We can account for this when calculating the amount of left-side float intrusion by flooring the X offset at 0.
15 lines
308 B
HTML
15 lines
308 B
HTML
<!doctype html><style>
|
|
* { border: 1px solid black; }
|
|
html { background: white; }
|
|
body {
|
|
position: relative;
|
|
left: 100px;
|
|
background: pink;
|
|
width: 300px;
|
|
}
|
|
div {
|
|
margin-left: -50px;
|
|
background: orange;
|
|
width: 200px;
|
|
}
|
|
</style><body><div>there are no floats intruding on this div
|