mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:17:35 +00:00
LibWeb: Fix alternating-sides float positioning
The "y" check for when to reset float side positioning was comparing an offset that included the border, while the offset of the other side does not.
This commit is contained in:
parent
c37b204ce1
commit
553694679e
3 changed files with 62 additions and 2 deletions
29
Tests/LibWeb/Layout/input/block-and-inline/float-4.html
Normal file
29
Tests/LibWeb/Layout/input/block-and-inline/float-4.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
body {
|
||||
width: 780px;
|
||||
text-align: center
|
||||
}
|
||||
.right {
|
||||
border: 1px solid red;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
float: right;
|
||||
}
|
||||
.left {
|
||||
border: 1px solid green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
float: left;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="left" >Left1</div>
|
||||
<div class="right">Right1</div>
|
||||
<div class="left" >Left2</div>
|
||||
<div class="right">Right2</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue