You don't need a filter unless the transparency is alpha transparency (actually called alpha opacity) and the browser is IE 6 or less. Even with a filter in IE 6 and less, there might not be any way to overlay the two images in the way you describe. However, if the transparency is single color transparency and they are saved in 256 colors or less, no filter is needed in IE 6 and less and they can easily be overlaid. All other browsers will display alpha opacity .png images just fine with no added filter and they can easily be overlaid. Say the images are 150x300:
HTML Code:
<div style="position: relative; width: 150px; height: 300px;">
<img src="img1.png" alt="" style="position: absolute; top: 0; left: 0;">
<img src="img2.png" alt="" style="position: absolute; top: 0; left: 0;">
</div>
No javascript required. If you want to start out with the images separate and/or unseen, javascript may be used to move them around and/or reveal them. But I would need more specifics on just how you want that to happen in order to provide javascript code for that.
Bookmarks