I have a container and dynamically generated div in the container.
HTML
<div id="overlay">
</div>
<div id="cont">
<div id="e1">
Some
</div>
<div id="e2">
Content
</div>
</div>
CSS
#cont{
position: fixed;
top:40%;
left:20%;
z-index:999;
color:#a8a8a8;
}
#overlay{
position:fixed;
background: rgb(0,0,0);
opacity: 0.5;
width:100%;
height:100%;
top:0;
left:0;
z-index:1000;
}
#e2{
z-index:1001;
}
Check this jsfiddle: http://jsfiddle.net/UkbXU/
I have an overlay with z-index 1000 and background rgba(0,0,0,0.5) and the photo container is behind overlay i want only one element to be above overlay, that is with z-index 1001. There are other elements in the container, i do this to show element highlighted effect. But creating a class with z-index: 1001 does'nt bring the element above overlay.
How can i set the z-index of one element to be greater than container?