Files
ladybird/Tests/LibWeb/Layout/input/float-with-padding-top-beside-short-float.html
Tim Ledbetter 245eb7d91d LibWeb: Use margin box for vertical overlap checks in float placement
Previously, a float with `padding-top` would overlap a preceding float
instead of being placed beside it. The vertical overlap check was
comparing the new float's content box Y,which includes the padding
offset, against preceding floats' margin box rects, causing the check
to incorrectly conclude the floats do not overlap.
2026-02-25 12:03:31 +01:00

19 lines
265 B
HTML

<!DOCTYPE html>
<style>
.a {
float: left;
width: 100px;
height: 20px;
background: green;
}
.b {
float: left;
width: 100px;
height: 10px;
padding-top: 40px;
background: blue;
}
</style>
<div class="a"></div>
<div class="b"></div>