Reputation: 13361
I've got a div which has another div drop down below it, but the drop-down appears below the content that's below it, and I want it to appear above it.
I've tried using z-index
by setting a lower z-index
for the content than the drop-down, but it's not working.
How can I make these divs appear in the correct order? - I've made a mockup of it on a jsfiddle.
Upvotes: 0
Views: 3873
Reputation: 424
I updated your jsfiddle: http://jsfiddle.net/mvRYR/1/
You need to set position: relative;
or position: absolute;
when using z-index
.
Upvotes: 2
Reputation: 75073
just add
z-index: 10; position: relative;
to your #drop
style
if you add background-color: yellow;
as well, you could see it better...
Upvotes: 1