igloobob
asked on
box shadow direction
Hello,
I am using the box shadow on somw divs on my page. Work prefect in Firefox, Safari etc but in IE they are all off set. I do not want any offset just and even drop shadow on all sides. I have this specified with the mox and webkit code but for the ms filter I am not sure what the direction should be.
As it is below in my code, there is an offset in IE.
Any ideas?
I am using the box shadow on somw divs on my page. Work prefect in Firefox, Safari etc but in IE they are all off set. I do not want any offset just and even drop shadow on all sides. I have this specified with the mox and webkit code but for the ms filter I am not sure what the direction should be.
As it is below in my code, there is an offset in IE.
Any ideas?
-moz-box-shadow: 0px 0px 5px #666;
-webkit-box-shadow: 0px 0px 5px #666;
box-shadow: 0px 0px 5px #666;
/* For IE 8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=135, Color='#666666')";
/* For IE 5.5 - 7 */
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=135, Color='#666666');
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Did you place the PIE.htc file in the correct place? Other than that it should work.
ASKER
yep I did it all correctly and still no joy, to be honest I abandoned it as it is an old job I was just having a review of and client is happy with it anyway. I meant to try it on a different site at some point but haven't got around to it yet.
ASKER
I got PIE working in the end, in adding it I didn't delete the old rules for the shadow so it was all duplicated and therefore not working.
PIE is the answer for me!
PIE is the answer for me!
ASKER
I got PIE working in the end, in adding it I didn't delete the old rules for the shadow so it was all duplicated and therefore not working.
PIE is the answer for me!
PIE is the answer for me!
My solution was inspired by this article.
The modification I'm suggesting is to the inner element to be explicitly positioned (with left/top or margin:auto if it has fixed size).
HTML
Open in new window
CSS
Open in new window
You will need to do more work on the code to make sure the .content-ie part only comes into play when in IE (conditional comments?)
http://jsfiddle.net/a8Ykg/1/