|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have two layers in my code. The bottom layer contains a jpg-image and the top layer contains a gif-image(?). There is 100% overlap. This works.
Now I want to make the entire image clickable. I tried putting <a href> around the two layers like this: <a href="/nextpage.asp"> <div id="top" style="position:absolute; left:50px; top:150px; width:180px; height:130px; z-index:2;"> <img src="/images/t1.gif" width="180" height="130" border="0"> </div> <div id="bottom" style="position:absolute; left:50px; top:150px; width:180px; height:130px; z-index:1;"> <img src="/images/p1.jpg" width="180" height="130" border="0"> </div> </a> Don't work. I tried another <div> around the two layers with the <a href> inside this layer like this: <div id="clickable"> <a href="/nextpage.asp"> <div id="top" style="position:absolute; left:50px; top:150px; width:180px; height:130px; z-index:2;"> <img src="/images/t1.gif" width="180" height="130" border="0"> </div> <div id="bottom" style="position:absolute; left:50px; top:150px; width:180px; height:130px; z-index:1;"> <img src="/images/p1.jpg" width="180" height="130" border="0"> </div> </a> </div> Don't work. Does anyone have a solution or suggestion? Please help me? Thanx. Kathy My code looks like this: <div id="top" style="position:absolute; left:50px; top:150px; width:180px; height:130px; z-index:2;"> <img src="/images/t1.gif" width="180" height="130" border="0"> </div> <div id="bottom" style="position:absolute; left:50px; top:150px; width:180px; height:130px; z-index:1;"> <img src="/images/p1.jpg" width="180" height="130" border="0"> </div> |
|
#2
|
|||
|
|||
|
You should just have to put the HREF around each image like a normal link.
This is a little wierd...what are you trying to do? |
|
#3
|
|||
|
|||
|
I assume the image on top is partially transparent. Is this what has caused the confusion? If the top image completely overlaps the lower one it is only possible to click the top one (even if you can see the other through it.)
Just put the A tags around the top image as Ahrt says. Is this the problem? John |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Clickable images with layers |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|