<div class="box1">BOX 1</div>
  <div class="box2">
    <div class="rect"></div>
  </div>
  <div class="box3">BOX 3</div>
  <div class="box3">BOX 3</div>
  <div class="box3">BOX 3</div>
  <div class="box3">BOX 3</div>
.box1 {
  background-color: skyblue;
  width: 100px;
  height: 100px;
}

.box2 {
  background-color: yellow;
  width: 100px;
  height: 100px;
  position: relative;
}

.rect {
  background-color: blue;
  width: 40px;
  height: 25px;
  position: absolute;
  top: 30px;
  left: 30px;
}

.box3 {
  background-color: red;
  width: 100px;
  height: 100px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.