Let's discuss a situation where we have a <div>
element with relative positioning, and inside it, there is an absolutely positioned <img>
.
<div style="position: relative;">
<img src="image.png" style="position: absolute;" />
<span id="overlay_text">OVERLAY</span>
</div>
The issue at hand is that the element should be positioned at the top of the screen (higher on the Y-axis), but its distance seems to be calculated from the bottom instead.