1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +00:00
serenity/Tests/LibWeb/Layout/input/block-and-inline/floats-and-negative-margins.html
Aliaksandr Kalenik 202b24584f LibWeb: Sum horizontal margins to calculate space used by floats
This fixes the issue where max margin is used to find offset of
floating box although horizonal margins do not collapse so they need
to be summed instead.
2023-05-24 18:58:42 +02:00

20 lines
No EOL
365 B
HTML

<style>
body {
width: 200px;
margin-left: 100px;
}
.row {
height: 200px;
margin-left: -50px;
background-color: blueviolet;
}
.item {
float: left;
width: 50%;
}
</style><div class="row"><div class="item" style="background-color: lightblue">
a</div>
<div class="item" style="background-color: lightgoldenrodyellow">
b</div>
</div>