0

if I have a div over my image tag, how it is possible to keep access to the image through the div? I mean when I right click on that div to have options from image tag like open image in new tab and so on, or even on left click to have access to the image, but the div should be visible..

I have something like :

CSS

myDiv {
  position: absolute;
  top : 0;
  left: 0;
  width: 100%;
  height: 100%;
}

HTML

   <div>
     <img src="..." alt="..">
     <div id="myDiv"></div>
   </div>

P.S : I saw on some kind of lightbox a zoom icon over images but on right click or on other action I had access to the image, not to the overlay div, as expected.

John
  • 7,500
  • 16
  • 62
  • 95
  • what is your question exactly ? – NullPoiиteя Dec 02 '12 at 08:56
  • See this : [HTML “overlay” which allows clicks to fall through to elements behind it](http://stackoverflow.com/questions/1401658/html-overlay-which-allows-clicks-to-fall-through-to-elements-behind-it) – Anujith Dec 02 '12 at 09:14

1 Answers1

0

I have found an answer :

CSS :

pointer-events: none;
John
  • 7,500
  • 16
  • 62
  • 95
  • 1
    That's not going to work in IE John.. Also see http://stackoverflow.com/questions/5855135/css-pointer-events-property-alternative-for-ie for the discussion on the subject. – Damien Overeem Dec 02 '12 at 09:17