views:

38

answers:

2

Hi,

I'm using opacity:0.4 property on a <div> element in my page.

I've just realised now that it doesn't work in IE at all... the color of the background is completely opaque.

Thanks.

+3  A: 

I use this set:

filter:alpha(opacity=50);
-moz-opacity:0.5;
-khtml-opacity: 0.5;
opacity: 0.5;

Not pretty, but it's cross-browser. IE uses the filter.

graphicdivine
@Patrik: I think nowdays you can skip "-moz-opacity" and "-ktml-opacity" are for very old browsers http://css-tricks.com/css-transparency-settings-for-all-broswers/
Marco Demajo
+2  A: 

IE doesn't support opacity. You can use MS's alpha filter instead:

filter:alpha(opacity=40);

http://msdn.microsoft.com/en-us/library/ms532967%28VS.85%29.aspx

RoToRa