Using CSS to display image over image: Position tags query

Nest them inside a relative element:

<style type="text/css"> 
.container { position:relative; }
.imgA1 { position:absolute; top: 0px; left: 0px; z-index: 1; } 
.imgB1 { position:absolute; top: 70px; left: 100px; z-index: 3; } 
</style>

<div class="container">
<img class="imgA1" src="image1.png">
<img class="imgB1" src="image2.png">
</div>

http://jsfiddle.net/nUPsh/1/


This article explains the CSS position property quite well:

http://css-tricks.com/absolute-positioning-inside-relative-positioning/

Tags:

Html

Css