<div class="outer-div">
 <div class="inner-div">
  <div class="left"></div>
  <div class="right"></div>
 </div>
</div>
.outer-div{
 height: 1000px;
 width: 200px;
 background-color: purple;
 margin: auto;
}

.inner-div {
 height: 100px;
 width: 100px;
 background-color: orange;
 margin: auto;
}

.left{
 height: 25px;
 width: 25px;
 background-color: red;
 position: fixed;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.