Here is a simple CSS snippet that I am working with...
div:before {
content: "Hello there";
filter: alpha(opacity=40);
-moz-opacity: .4;
opacity: .4;
}
In Firefox 6, the :before
pseudo element displays with the correct opacity. However, in IE8, the opacity is not applied.
Usually, setting the opacity on the main div
works fine, but that's not what I'm aiming for.
I attempted to add display: block
to no avail.
While I could find a way around this issue, I was wondering if there's a clever trick to make IE8 recognize the opacity
property on a :before
(and perhaps also on a :after
) pseudo element?