mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-22 16:09:23 +00:00
Previously floats would be placed next to the highest float that fitted the new float on its line. However, this violates the rule that floats should be placed under the preceding float if it does not fit next to it.
32 lines
516 B
HTML
32 lines
516 B
HTML
<!DOCTYPE html>
|
|
<head>
|
|
<style>
|
|
.container {
|
|
width: 100px;
|
|
height: 150px;
|
|
border: 1px solid black;
|
|
}
|
|
|
|
.left {
|
|
float: left;
|
|
height: 50px;
|
|
}
|
|
|
|
.w80 { width: 80px; }
|
|
.w40 { width: 40px; }
|
|
.w20 { width: 20px; }
|
|
|
|
.red { background: red; }
|
|
.blue { background: blue; }
|
|
.yellow { background: yellow; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
abc abc abc
|
|
abc abc abc
|
|
<div class="left w80 red"></div>
|
|
<div class="left w40 yellow"></div>
|
|
<div class="left w20 blue"></div>
|
|
</div>
|
|
</body>
|