I have this code to cast a shadow on imagese:
.shadow{
box-shadow: -2px 2px 4px #666;
-webkit-box-shadow: -2px 2px 4px #666;
-moz-box-shadow: -2px 2px 4px #666;
filter: progid:DXImageTransform.Microsoft.dropShadow(color=#666, offX=-2, offY=2, positive=true);
}
This works in FF, Opera, Safari, Chrome but not in IE6 (haven’t tested any other IE version yet)
Thanks
UPDATE:
<img src="......" class="shadow">
No width or height specified…
The problem is that the shadow is crisp and completely black, instead of fading like a shadow should, and like it does in FF for example.
Hard to describe… The shadow is there, but it isn’t faded, its like a black box behind the image.
The element needs to have layout (from MSDN):
Also see On having layout for more details.
Note also that that
filtersyntax will only work in IE6 and IE7. IE8 needs the-ms-filterproperty instead, and its value should be in quotes.In short, to make it work in IE6, add
zoom: 1, and to make it work in IE8 too, add an-ms-filterproperty (before the filter property!):