I have two circular concentric divs one on the other. I have to show alerts on the click of those two circles.
My HTML code looks like :
<div id="circle2" style="position: absolute.display:none;left:14px;top:35px;width:266px;height:266px;background-Color:#EFA927;border-radius:50% 50%;" onclick="alert('2');"></div>
<div id="circle1" style="position: absolute;display:none;left:31.5px;top:52.5px;width:231px;height:231px;background-Color:#0080C0;border-radius:50% 50%;" onclick="alert('1');"></div>
Everything works fine for Mozilla but for chrome at the left-top ,right-top , top-bottom , left-bottom corner of circle1 chrome is giving me alert for circle1 (circle 2 is expected).
Is there any way to rectify this thing?
I don’t completely understand your question, but using this code there’s no problem:
When you click on the
circle1, it alerts “1”, oncircle2it alerts “2”.