Reputation: 3527
I've been using the colorzila tool to generate some css gradients. They work in all browsers I test in save for IE9; haven't tried the other IE's yet. They have an IE checkbox on their UI. When I set it to on, the gradient sample no longer has a gradient; it defaults to the base solid color.
I thought it should work in IE since they do include the following css function
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#221f1f', endColorstr='#221f1f',GradientType=1 ); /* IE6-9 */
http://www.colorzilla.com/gradient-editor/#_
Upvotes: 0
Views: 1108
Reputation: 168783
I suggest dropping those horrible filter
styles. There is a much easier and more compatible solution available. CSS3Pie is a library that allows IE to make use of the standard CSS gradient syntax.
It's much easier to use than the filter
, and easier to maintain in your code as well. It works in all versions of IE, and plus it also does the same trick for a few other CSS features too such as border-radius
.
In addition, I would point out that the comment in your code snippet is incorrect -- your snippet says "IE6-9", but in fact the filter
style has been discontinued in IE9, in favour of standard CSS syntax.
Unfortunately, this is a problem for you as IE9 doesn't support standard CSS gradients either. They've taken away something that worked (kinda) and replaced it with... nothing (in this case).
Fortunately, CSS3Pie does allow gradients, even in IE9, so it is the solution to your problem.
Hope that helps.
Upvotes: 3
Reputation: 34853
They have a button under the css called
IE9 Support (?)
Make sure you check that and follow the instructions that appear.
Upvotes: 1