Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Nov 2011
    Posts
    154
    Thanks
    5
    Thanked 0 Times in 0 Posts

    click through transparent div?

    I have a div background image that is partially transparent, and another div lies beneath that which has a clickable link. As it is now, I'm not able to click the link in the bottom div, even though it can be seen through the transparent areas of the top div. Is there a way to allow clickability through the transparent parts of an image/div? I need this to work in IE, FF, Chrome.. Any ideas?

  • #2
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    I'm thinking at this point you need to reorganise your code. Why is a background in the foreground?

  • #3
    Regular Coder
    Join Date
    Nov 2011
    Posts
    154
    Thanks
    5
    Thanked 0 Times in 0 Posts
    This problem still occurs even if the image is displayed using img tag, it doesn't have to be a div bg image. No matter how I display the images I can't get access to links behind the transparent areas of them.

  • #4
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Quote Originally Posted by resin View Post
    This problem still occurs even if the image is displayed using img tag, it doesn't have to be a div bg image. No matter how I display the images I can't get access to links behind the transparent areas of them.
    I don't see why you have to display your background like that. Why don't you give us a link to your page and we can find some workaround?

  • #5
    Regular Coder
    Join Date
    Nov 2011
    Posts
    154
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Ok here is the test page- http://resin.webs.com/new2.html . The entire blue image is a link, but currently it can't be clicked at all even though it is showing through the trasparent areas of the red image. I want to be able to click through the hole and through the other transparent areas of the red image. Note that each image will have its own attributes and effects in the end product, so simply merging the 2 images into a single image will not work. I just need to be able to click through transparent areas of images. Your help is greatly appreciated.

  • #6
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    830
    Thanks
    10
    Thanked 79 Times in 77 Posts
    Why not make the transparent image an image map with the hotspot where you want the link? It can be done that way, but you just can not click a link the browser doesn't know is there.
    ☠ ☠RON☠ ☠


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •