I’m having a problem with dropshadow and other hacks in IE. I have seen lots and lots of the fixes for IE. I cannot get them to work for me and I cannot find an explanation of why.
Here is an example of one of the hacks I have tried:
https://i.stack.imgur.com/UR6ZU.png
My code and webpage are on the left. The website this hack is taken from is:
http://robertnyman.com/2010/03/16/drop-shadow-with-css-for-all-web-browsers/
What really gets me is that it will work on that site in IE. I also have the source inspected (in chrome) but the page is displayed in IE.
This is IE 8, just to clarify.
Any explanation of this would be much appreciated.
HTML:
<head>
<link REL=StyleSheet HREF="style.css" TYPE="text/css" MEDIA=screen />
</head>
<body>
<div class="shadow">Nothing to see, move along.</div>
</body>
CSS:
.shadow {
-moz-box-shadow: 3px 3px 4px #000;
-webkit-box-shadow: 3px 3px 4px #000;
box-shadow:3px 3px 4px #000;
-ms-filter: “progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color=’#000000′)”;
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color=’#000000′);
background-color:00ccff;
}
Most likely caused by not setting the correct DOCTYPE. Try adding
<!DOCTYPE html>to the top of your document