I have found a really strange behaviour for the CSS opacity
combined with floating elements.
Consider following HTML:
<div style="position: relative; clear: both">
<div style="float:left>Left button</div>
<div style="float:right>Right button</div>
</div>
<div style="opacity: 0.9">Overlay</div>
The last div
will overlay the first two floating ones. Removing the opacity will put the latest div under the floating ones.
This is how it looks on my real-life page (red background is just used to emphasize the effect):
Now, if I remove the opacity of the middle div:
Sudenly, the floating divs are acessible.
I tried the z-index
property, but wasn't surprised when this didn't help. I even achieved to reproduce this in JS fiddle.
So, what's this? Any workarounds?
Note: so far, tested in chrome and firefox. The result was the same.
Opera confirmed too.
PS.: Could anyone explain to me, why JSFiddle does not work in full-screen result? I think this is not the first time full screen result didn't work for me.