8

take look at this:
http://www.templatemonster.com/demo/35403.html

In this template you can click on the image under the man's forearm even over the forearm itself.
The hand is not a part of images. It is three div pieces that has a png image as background.

How is it possible?
How Can I do the same thing (have a div that contains a linked image and have another div on it but the underlying link be clickable)?
Is it cross-browser?

Thanks

Ariyan
  • 14,240
  • 30
  • 109
  • 168

3 Answers3

25

You could just add pointer-events:none in your stylesheet to the element you're trying to click through

Example here: http://robertnyman.com/css3/pointer-events/pointer-events.html

Check the checkbox to see how the grey box is able to be clicked through.

Tim M.
  • 52,666
  • 12
  • 118
  • 157
itsbc
  • 510
  • 6
  • 14
4

it's made with

pointer-events:none;

it don't works in IE and Opera, but that is in this case not really a problem. It just don't work over the arm itself.

Sven Bieder
  • 5,319
  • 2
  • 19
  • 27
1

In modern browsers you can use the pointer-events css3 property. Here is a famous question about this : Click through a DIV to underlying elements

Community
  • 1
  • 1
olivieradam666
  • 4,152
  • 2
  • 16
  • 24