views:

669

answers:

1

hi.. I need a little guidance here...

I have 2 links:

<div class="tarjBodyHolder">
    <div class="imageHolder">
        <a href="#" onclick="alert('picture link'); return false;">
           <img border="0" src="/picture.jpg" />
        </a>
    </div>
    <div class="linkTransp">
       <a href="#" onclick="alert('family link'); return false;">RAM Moudles</a>
    </div>
</div>

The Css:

.tarjBodyHolder{
    position: relative; 
    clear: both; 
    height: 152px;
 }

.tarjBodyHolder .linkTransp{
     position: absolute; 
     bottom: 0px; 
     left: 0px; 
     width: 120px;
     height: 15px;
     z-index: 6; /*IE bug*/
}
.tarjBodyHolder .linkTransp a {
     display: block;
     text-indent: -9999px; 
     width: 120px; 
     height: 15px;
     overflow: hidden;
     z-index: 6;
 }
 .tarjBodyHolder .imageHolder{
     position: absolute; 
     bottom: 0px; 
     left: 0px;/*IE 7 bug*/
 }

this is the next:

The img link is a picture of an item. and this picture has printed on it the category where the items belongs. For example: DDR RAM module has the picture and the string "<< RAM MODULES" printed on it. The idea of this is that when you click this string this takes you to this category of this item and you can see ALL the products contained on it; but if you click the picture of the product you will end in the product description page. what I need is the following:

Overlap the "invisible"(*) category link and the picture link. That's the reason why I've used position: absolute; On Firefox it really great.. but I cant figure out how to do this on IE6 / 7. No matter what I do It doesn't work with the text-indent: -9999px.. if I comment this the text becomes visible and I can click on it.. but can't otherwise. I've tried even declaring the A width and height!!

(*) I say "invisible" because this link should have the text.. but you shouldn't be able to see it because it's indented -9999px.

+1  A: 

Sounds to me like you want and old fashioned image map. Overlapping linked items like this is rarely a good idea.

What I hear is that you have an image. Part of the image (the pic part) links to the description page. The other part (the text part) links to another URL of categories.

Either live with 1 image above and a text link below, or use the < map > tag to split up the image.

It's fairly easy to do it in something like fireworks/dreamweaver. However if you want to break out a good old fashioned text editor heres the documentation:

http://www.w3schools.com/TAGS/tag_map.asp

ascotan
that's the reason because the image have this string printed. because on the OLD site I've done this with a image map, but I want to replace this by the link so SE can index this links too... thanks for the fast reply! ^^
KnF