Actually, that’s the opposite of my problem. Opacity being applied (through javascript) is NOT being applied to the children, but for some reason only the container in IE. Firefox is fine.
Hi, if you want it to be applied to the children why not do it in CSS? I don’t know why it isn’t working in javascript since this isn’t the javascript forum.
Now, everything inside that div should be opacity .4, correct? Well, in IE, the first image drops in opacity, but the rest of the divs are still showing without any transparency at all. Inner Div layers are not reacting. Fine in FF.
Since IE doesn’t support the opacity property and uses a proprietary filter property, the probable cause is that filter is not inherited by descendant elements.
Therefore I suspect that you need to iterate over all descendants and set the filter explicitly for each one. But that’s a JavaScript issue, not a CSS issue.
The code you specified above works fine for me in IE and all children get the opacity (it is not actually inherited as such but the whole parent and children are first rendered then opacity is applied as a whole).
In IE however adding position:relative to a child element will stop the opacity from affecting the child element and is just another strange IE only quirk.
It seems that you may have in your code (not shown to us) set the child to position:relative. Remove the position:relative (if possible) and the whole contents will be opaque