I have a progress bar that needs to be on top of an overlay, here is the broken jsfiddle
Markup:
<div class="overlay mouse-events-off">
<div class="progress progress-striped active">
<div class="bar" style="width: 40%;"></div>
</div>
</div>
CSS:
.overlay { background-color: black; position: fixed; top: 0; right: 0; bottom: 0; left: 0; opacity: 0.2; /* also -moz-opacity, etc. */ z-index: 100; }
.progress { position: absolute; top: 50%; left: 35%; width:300px; height:20px; z-index:101; opacity:1.0; }
The progress bar is also at 20% opacity.
I have a fix by just placing the <div>
that carries the progress bar outside of the overlay it works. But seems like extra mark-up
Working Markup:
<div id="progress" style="display:none;">
<div class="progress progress-striped active glow">
<div class="bar" style="width: 40%;"></div>
</div>
<div class="overlay mouse-events-off"></div>
</div>
Is there a more elegant way to solve this with just CSS?