1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:18:12 +00:00

LibWeb: Make sure float: left boxes get pushed down if they can't fit

This commit is contained in:
Andreas Kling 2023-03-15 10:22:37 +01:00
parent 52e2095a3f
commit db545b51ef
5 changed files with 110 additions and 9 deletions

View file

@ -0,0 +1,32 @@
<!DOCTYPE html><html><head><style>
* {
margin: 0;
padding: 0;
}
body {
width: 200px;
}
div {
float: left;
width: 150px;
height: 50px;
}
.red {
background: red;
}
.green {
background: green;
}
.blue {
background: blue;
}
.orange {
background: orange;
}
</style></head><body><ul><div class="red"></div><div class="green"></div> </ul><div class="orange"></div>

View file

@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<style>
* {
border: 1px solid black !important;
margin: 0;
padding: 0;
}
body {
width: 400px;
}
.yellow {
width: 60px;
height: 50px;
float: left;
background: yellow;
}
.orange {
width: 250px;
height: 50px;
float: left;
background: orange;
}
.green {
background: lime;
width: 100px;
height: 50px;
float: left;
}
</style>
</head>
<body>
<div class="ul">
<div class="yellow"></div>
<div class="orange"></div>
</div>
<div class="green"></div>
</body>
</html>