Skip to content

Instantly share code, notes, and snippets.

@chrsr
Created May 10, 2012 06:36
Show Gist options
  • Save chrsr/2651475 to your computer and use it in GitHub Desktop.
Save chrsr/2651475 to your computer and use it in GitHub Desktop.
IE7/8 element click stack
<!DOCTYPE html>
<html>
<body>
<div style="position: relative; width:500px; height:500px;">
<div style="position: relative;">
<img style="position: relative;" src="http://placedog.com/400/300" onclick="alert('image')">
</div>
<div style="border: solid 1px green; position: absolute; width:50%; height:100%; left:0; top:0;" onclick="alert('left')">content</div>
<div style="border: solid 1px red; position: absolute; width:50%; height:100%; right:0; top:0;" onclick="alert('right ')">content</div>
</div>
</body>
</html>
@chrsr
Copy link
Author

chrsr commented May 10, 2012

Strange IE behaviour... should this be expected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment