Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<meta charset="utf-8">
<style>
.container {
position: relative;
width: 300px;
height: 50px;
margin-bottom: 10px;
background: lightgray;
}
.item {
position: absolute;
top: 0;
height: 50px;
background: green;
}
</style>
<div class="container">
<div class="item" style="left: 0px; width: 30px"></div>
<div class="item" style="left: 40px; width: 50px"></div>
</div>
<div class="container">
<div class="item" style="left: 0px; width: 170px"></div>
</div>