console
<div class="parent">
<div class="box1">1</div>
<div class="box2">2</div>
<div class="box3">3</div>
<div class="box4">4</div>
<div class="box5">5</div>
</div>
.box1 {
width: 150px;
height: 150px;
background: lightcoral;
}
.box2 {
width: 150px;
height: 150px;
background: lightgray;
}
.box3 {
width: 150px;
height: 150px;
background: lightyellow;
}
.box4 {
width: 150px;
height: 150px;
background: lightgreen;
}
.box5 {
width: 150px;
height: 150px;
position: relative;
background: lightcyan;
}
.parent {
width: 450px;
height: 450px;
border: 1px dashed #ccc;
position: relative;
}
.box1 {
position: absolute;
left: 150px;
}
.box2 {
position: absolute;
top: 150px;
}
.box3 {
position: absolute;
top: 150px;
left: 150px;
}
.box4 {
position: absolute;
top: 150px;
left: 300px;
}
.box4 {
position: absolute;
top: 150px;
left: 300px;
}
.box5 {
position: absolute;
top: 300px;
left: 150px;
}