codeAnand
codeAnand

Reputation: 990

Unable to click a div, how do I bring one div on top of another

I have this jsfiddle http://jsfiddle.net/fwQq4/19/

Here I have the wrapper class (div.wrapper) above the div#middle. So if I click on the div#middle the click is happening on div.wrapper. How can I get the click to have middleElement as the source.

The real problem is I have many items inside the middle element, and I want to find which element the user clicked on.

How can I get the middle element on top!

Upvotes: 2

Views: 499

Answers (1)

bennedich
bennedich

Reputation: 12369

Add these two lines of css to #middle:

position: relative;
z-index: 1;

Upvotes: 5

Related Questions