Reputation: 36138
I have a hidden element on my page. When a button is clicked, it makes the element below it slide down using slideToggle. The problem is that it is showing up behind the content that is below it: http://jsfiddle.net/Messp/
I would like to make the toggled image to show in the front of the content. I tried using z-index but that does not work. Does anyone know how to fix this issue?
Upvotes: 0
Views: 656
Reputation: 666
The image needs to be a positioned element for the z-index to take effect.
Throwing "position: relative;" on it should do the trick. :)
http://jsfiddle.net/Dygerati/DyPeC/1/embedded/result/
Upvotes: 2