<html>
<head>
</head>
<body>
<div class="relative">This div element has a CSS position property like "position: relative;"
  <div class="absolute">This is the nested element has  CSS position property like "position: absolute;" </div>
</div>

</body>
</html>
div.relative {
    position: relative;
    width: 400px;
    height: 200px;
  padding:20px;
    border: 6px solid #2980b9;
    background:#3498db;
} 

div.absolute {
    position: absolute;
    top: 80px;
    right: 0;
    width: 200px;
    height: 100px;
    padding:20px;
    border: 6px solid #e67e22;
    background:#f39c12;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.