<div class="parent">
  <div class="child">
    Hello relative !
  </div>
</div>
.parent {
  position: relative;
  width: 300px;
  height:300px;
  background:red;
}

.child {
  font-family: Arial;
  display:flex;
  justify-content:center;
  align-items:center;
  position: absolute;
  width: 150px;
  height: 150px;
  background: white;
  right: 5px;
  top:5px;
  box-shadow: 0px 4px 4px rgba(0,0,0,0.5)
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.