<span class="container">
   <div class=original-box>
     <div class="box">
     </div>
   </div>
   <div class=original-box>
     <div class="box top">
       top: 20px;
     </div>
   </div>
   <div class=original-box>
     <div class="box bottom">
       bottom: 20px;
     </div>
   </div>
      <div class=original-box>
     <div class="box top left">
       left:&nbsp;20px;
       top:&nbsp;20px;
     </div>
   </div>
   <div class=original-box>
     <div class="box">
     </div>
   </div>

 </span>
.container {
  padding 10px;
  display: flex;
  justify-content: center;
  height: 90vh;
}

.box {
  border: 1px solid black;
  background-color: darkorange;
  width: 100px;
  height: 100px;
  text-align: center;
  display: inline-block;
  align-self: center;
  margin-left: -1px;
  margin-top: -1px;
}

.original-box {
  border: 1px dotted gray;
  background-color: lightgray;
  width: 100px;
  height: 100px;
  text-align: center;
  display: inline-block;
  align-self: center;
  margin: 10px;
}

.top {
  top: 20px;
  position: relative;
}

.bottom {
  bottom: 20px;
  position: relative;
}

.left {
  left: 20px;  
  position: relative;
}

.right {
  right: 20px;
  position: relative;
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.