<div>
  <div id="absolute">absolute</div>
</div>
<div id="parent">
  <div id="child">children</div>
</div>
#absolute {
  background: yellow;
  position: absolute;
  right: 0;
  border: 2px dotted red;
  color: red;
}

#parent {
  position: relative;
  width: 100px;
  height: 100px;
  background: skyblue;
}

#child {
  position: absolute;
  right: 0;
  border: 2px dotted red;
  color: red;
  background: lightpink;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.