<div class="parent">
<div class="box red"></div>
<div class="box yellow"></div>
<div class="box green"></div>
</div>
.parent {
display: inline-flex;
gap: 1rem;
border: 4px solid magenta;
padding: 8px 1rem;
position: relative;
}
.box {
width: 100px;
height: 100px;
border: 4px solid black;
}
.red {
background: red;
}
.yellow {
background: yellow;
position: absolute;
top: 20px;
right: 10px;
}
.green {
background: green;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.