Reputation: 563
I have a div and i gave it some css properties, it works on every other browser apart from 1e8 and below (as usuall). How can i make it work on ie8? http://jsfiddle.net/WY5Cu/
Upvotes: 1
Views: 130
Reputation: 6339
Have a look at http://www.colorzilla.com/gradient-editor/ – the gradient editor there will generate IE8 compatible background gradients.
For the box-shadow
, this rule should emulate your current code somewhat:
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=1, Direction=135, Color='#000000')";
albeit without the inset shadow (I doubt there’s a way to do that in IE8).
To combine multiple filter declarations (for your shadow and gradient fill) you’ll need to chain them together with a space. For example:
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=1, Direction=135, Color='#000000') progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e5799', endColorstr='#7db9e8',GradientType=0 )";
For IE7 you’ll need to duplicate the IE8 rules, but with filter
instead of -ms-filter
and leave out the start and end quotes.
Upvotes: 3
Reputation: 18530
Try with CSS3 Pie which makes IE 6 - 9 capable of supporting the properties you need (linear-gradient and box-shadow)
Upvotes: 0
Reputation: 67194
If you really want to go through all the effort of enabling features in a browser that doesn't natively support it you can use CSS3pie.
This lets you use CSS3 features with IE browsers 6-8 (9 already supports some of them) with minimal effort. Just download, attach to your site and away you go.
Upvotes: 1