CSS: Making two transparent images overlapping
- by Pierre
Hi all, I'm trying to make two transparent images (having the same size/dimension ) overlapping into a div at their top left corner. I tried:
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<div style="margin:20px;">
<div id="main" style="overflow:hidden;background-color:red;width:400px;height:400px;border:3px solid blue;">
<img src="myimage1.png" style="position:relative;top:0px;left:0px;z-index:0;"/>
<img src="myimage2.png" style="position:relative;top:0px;left:0px;z-index:10;"/>
</div>
</div>
</body>
</html>
but it doesn't work, the two pictures are concatenated into the parent div.
Thanks for your help !