Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<html>
<style>
</style>
<body>
<p>When an item with negative margins are placed, ensure the items after it are placed immediately behind it</p>
<div style="display: flex; flex-direction: column; width: 50px;">
<div style="background: aquamarine; height: 50px;" >
item 1
</div>
<div style="background: aquamarine; height: 50px;" >
item 1
</div>
<div style="background: aquamarine; height: 50px;" >
item 1
</div>
<div style="background: lightblue; height: 50px; margin-top: -100px;" >
item 2
</div>
<div style="background: lightpink; height: 50px;">
item 3
</div>
</div>
</body>
</html>