One option would be to offset / negate parental positioning by wrapping the element around #three (in this case, I added the .displacement element).
Absolutely place this wrapping element and place it to cover the parent (using top: 0 / right: 0 / bottom: 0 / left: 0 ). Then extrude the element with negative translation values ββrelative to the parent.
<div class="displacement"> <div id="three"></div> </div>
.displacement { -webkit-transform: translateY(-25px) translateX(-25px); transform: translateY(-25px) translateX(-25px); position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 200%; height: 200%; }
In this case, the #three element #three positioned absolutely relative to #one , and the portable positioning of the parent #two effectively shifted.
Updated example
.displacement { -webkit-transform: translateY(-25px) translateX(-25px); transform: translateY(-25px) translateX(-25px); position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 200%; height: 200%; } #three { background-color: white; height: 25px; width: 25px; position: absolute; left: 0; bottom: 0; }
source share