I'm dealing with a progress bar that needs to be displayed on top of an overlay. If you take a look at this jsfiddle, you can see the issue.
Here's the markup:
<div class="overlay mouse-events-off">
<div class="progress progress-striped active">
<div class="bar" style="width: 40%;"></div>
</div>
</div>
And here's the CSS:
.overlay { background-color: black; position: fixed; top: 0; right: 0; bottom: 0; left: 0; opacity: 0.2; z-index: 100; }
.progress { position: absolute; top: 50%; left: 35%; width:300px; height:20px; z-index:101; opacity:1.0; }
The progress bar also has a 20% opacity, which is causing issues.
I did find a workaround by moving the <div>
holding the progress bar outside of the overlay, but it feels like unnecessary extra markup.
Here's the updated 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 solution using just CSS?