I want one image above the other. How can I do it?
+1
A:
Set the image you want on top to have a higher z-index. Right now, it has a lower z-index.
Robusto
2010-08-08 02:55:34
the problem is the images are not showing but everything is right name and address
SDK_User
2010-08-08 03:05:03
+2
A:
from the code you posted, it appears you are passing an img
element into another the src
attribute of another img
element. Is there a reason you are doing this?
<style type="text/css">
.imgA1 {position:absolute;
top:0px;
left:0px;
z-index:2;
width:1300px;
height:283px;}
.imgB1 {position:absolute;
top:0px;
left:0px;
z-index:1;
width:1300px;
height:1000px;}
</style>
<img class="imgA1" src="images/home_nav.png" alt="home_nav" />
<img class="imgB1" src="images/paperbackground.png" alt="Background" />
A similar code mockup can be seen at http://jsfiddle.net/gBPBd/3/ with my images to prove the concept and it is funcitoning in chrome, ie8.
Gabriel
2010-08-08 03:12:28
Thanks Gabriel But The Home Nav image is still behind the paper background image. @Gabriel
SDK_User
2010-08-08 03:22:57
<style type="text/css"> // if imgA1 is intended to be on top set a higher z-index .imgA1 {position:absolute; top:0px; left:0px; z-index:3; width:1300px, height:283px;} .imgB1 {position:absolute; top:0px; left:0px; z-index:1; width:1300px, height:1000px;}</style>----------------------------------.imga1 is staying behind??
SDK_User
2010-08-08 03:54:19
I worked on it a bit more, looks like my comment was breaking the selector. I have modified it. You can also see it working here http://jsfiddle.net/gBPBd/3/ though I have used my own images so you can see the result.
Gabriel
2010-08-08 03:56:54