If so, which PNG IE fix would you recommend?
views:
26answers:
2
Q:
Centered content with drop shadow and a pattern background. Is transparent PNGS the only way to go?
+1
A:
If your drop shadow is partially transparent and can't use a .gif then yes that is really the only way to go. Firstly, I must say the obligatory %^&* IE 6. Second, I have had great luck with http://jquery.andreaseberhard.de/pngFix/ but I loves me some jquery so take this as just personal opinion and if you arn't already using jquery may not be the best for you.
Jonathan Park
2010-07-27 21:29:31
+1
A:
If you do not necessarily need your CSS to validate, you might use this:
.box-shadow {
-moz-box-shadow: 2px 2px 3px #969696; /* FF 3.5+ */
-webkit-box-shadow: 2px 2px 3px #969696; /* Webkit = Safari + Chrome */
-khtml-box-shadow: 2px 2px 3px #969696; /* Konqueror */
box-shadow: 2px 2px 3px #969696; /* Opera */
filter: progid:DXImageTransform.Microsoft.Shadow(color='#969696', Direction=145, Strength=3); /* IE */
}
It uses the box-shadow CSS3 property where appropriate and for MSIE it uses filters. If you can trust your users have updated browser or use IE, you should be safe.
The code is not entirely from my head, I used http://www.smashingmagazine.com/2010/04/28/css3-solutions-for-internet-explorer/ for reference.
dark_charlie
2010-07-27 21:37:58
Just noticed another nice article on this topic at Opera developer portal: http://dev.opera.com/articles/view/cross-browser-box-shadows/
dark_charlie
2010-07-27 21:39:50
This is all great. Thanks a lot for the help!
Tom Fletcher
2010-07-27 22:18:36