9

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,760
  • 31
  • 112
  • 175

3 Answers3

26

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.
  • 53,671
  • 14
  • 120
  • 163
itsbc
  • 520
  • 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,515
  • 2
  • 21
  • 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,522
  • 2
  • 20
  • 25