One may wonder why, even though the right property is set to 0, the child div appears aligned with the left side instead of being on the right side of its parent div.
div.relative {
position: relative;
width: 400px;
height: 200px;
border: 3px solid #73AD21;
}
div.child {
position: relative;
top: 80px;
right: 0px;
width: 200px;
height: 100px;
border: 3px solid #73AD21;
}
<div class="relative">This div element has position: relative;
<div class="child">This div element has position: relative;<div>
</div>
The outcome of the above code snippet can be viewed here: