Of course, the easiest way would be to absolutely position both images in your container:
<div style="position:relative"> <img src="main-image.jpg" style="position:absolute;"/> <img src="overlay-image.png" style="position:absolute;"/> </div>
position:relative on the container is necessary for the absolute positioning of children to work. Of course, if the container itself is already installed, then that's fine.
position:absolute not required on the base image if both images are in the upper left corner, but if necessary, it allows you to adjust its placement.
You can also use the static position in the main image and the relative position in the overlay image:
<div style="position:relative"> <img src="main-image.jpg" style="width:100px"/> <img src="overlay-image.png" style="position:relative; left:-100px"/> </div>
but for this you will need to find out the width of the base image.
harpo
source share