[Solved] Does onclick work with any positioning? [closed]


Absolute positioning has no effect on how the onClick event is being fired.

You are simply positioning your element below another element, so another element is blocking the mouse event


Try adding to your CSS:

#cogdiv {
 z-index: 9999; //or greater, or 1. Just make sure it's bigger than the overlapping element's z-index
} 

Reading up on what z-index and CSS stack-order might also help.

9

solved Does onclick work with any positioning? [closed]