<style>
  div {
    height: 200px;
    width: 200px;
  }

  .first {
    position: absolute;
    background: blue;
  }

  .second {
    position: relative;
    background: red;
  }
</style>

<div class="first">First element</div>
<div class="second">Second element</div>
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.