Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3662922
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:28:18+00:00 2026-05-19T01:28:18+00:00

I have an image which may have some divs over it (specifying certain selections

  • 0

I have an image which may have some divs over it (specifying certain selections within that image). These divs are supposed to be clickable. Something like that:

#divOuter { width: 500px; height: 500px; border: 2px solid #0000FF; position: relative; } 
#divInner { width: 100px; height: 100px; border: 2px solid #00FF00; position: absolute; cursor: pointer;  top: 20px; left: 20px; }

<div id="divOuter">
    <img src="SomeImage.jpg" />
    <div id="divInner"></div>
</div>

$("#divOuter").click(function() { alert("divOuter"); });
$("#divInner").click(function() { alert("divInner"); });

In chrome and FF it works as expected (pointer appears over the div, and clicking it alerts “divInner” and then “divOuter”).
However, in IE8 it didn’t – I got the same behavior only when hovering/clicking on the inner div borders. When clicking inside that div, only “divOuter” was alerted.
How can this be fixed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T01:28:19+00:00Added an answer on May 19, 2026 at 1:28 am

    Here’s a hack: add an CHAR like “O” to the inner div, and then give it an enormous font size(depends on the area you want to span over):

    #divInner { /* ... */; font-size: 1000px; color: transparent; }
    

    (Also set “overflow: hidden” I think.)

    IE likes there to be something there in the container for the click to affect. If it’s just completely empty, it ignores clicks.

    a fiddle: https://jsfiddle.net/cbnk8wrk/1/ (watch in IE!)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Serializable object which is supposed to hold a java.awt.Image as its
I have a scanned image of a document which has multiple boxes which may
I have some elements inside an UpdatePanel which may or may be displayed, depending
I have an image on which I may use a ScaleTransform to increase the
I have several questions about the PE subsystem field, which may overlap to some
I have a JPEG image (actually a BLOB in a database) which I want
I have a form which takes both the user details and an image uploaded
I have the following XAML code, which displays a picture (image inside borders) and
I'm tinkering with Silverlight 2.0. I have some images, which I currently have a
We have an HTML page which displays a bunch of pretty bars using divs

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.