background: #f85032;
/* Old Browsers */
background: -moz-linear-gradient(left, #f85032 0%, #f16f5c 50%, #f6290c 51%, #f02f17 71%, #e73827 100%);
/* FF3.6+ */
background: -webkit-gradient(left top, right top, color-stop(0%, #f85032), color-stop(50%, #f16f5c), color-stop(51%, #f6290c), color-stop(71%, #f02f17), color-stop(100%, #e73827));
/* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, #f85032 0%, #f16f5c 50%, #f6290c 51%, #f02f17 71%, #e73827 100%);
/* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, #f85032 0%, #f16f5c 50%, #f6290c 51%, #f02f17 71%, #e73827 100%);
/* Opera 11.10+ */
background: -ms-linear-gradient(left, #f85032 0%, #f16f5c 50%, #f6290c 51%, #f02f17 71%, #e73827 100%);
/* IE 10+ */
background: linear-gradient(to right, #f85032 0%, #f16f5c 50%, #f6290c 51%, #f02f17 71%, #e73827 100%);
/* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f85032', endColorstr='#e73827', GradientType=1 );
/* IE6-9 */
Asked
Active
Viewed 429 times
-1

punit sharma
- 25
- 7
-
[See this](http://stackoverflow.com/questions/3934693/gradients-in-internet-explorer-9)! – Dhaval Marthak Jun 03 '14 at 10:01
2 Answers
1
I presume you generated the code from: http://www.colorzilla.com/gradient-editor/.
I believe you missed the SVG part for IE9, below is the complete CSS needed:
background: rgb(248,80,50); /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIxMDAlIiB5Mj0iMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y4NTAzMiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iI2YxNmY1YyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUxJSIgc3RvcC1jb2xvcj0iI2Y2MjkwYyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjcxJSIgc3RvcC1jb2xvcj0iI2YwMmYxNyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlNzM4MjciIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
background: -moz-linear-gradient(left, rgba(248,80,50,1) 0%, rgba(241,111,92,1) 50%, rgba(246,41,12,1) 51%, rgba(240,47,23,1) 71%, rgba(231,56,39,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(248,80,50,1)), color-stop(50%,rgba(241,111,92,1)), color-stop(51%,rgba(246,41,12,1)), color-stop(71%,rgba(240,47,23,1)), color-stop(100%,rgba(231,56,39,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, rgba(248,80,50,1) 0%,rgba(241,111,92,1) 50%,rgba(246,41,12,1) 51%,rgba(240,47,23,1) 71%,rgba(231,56,39,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, rgba(248,80,50,1) 0%,rgba(241,111,92,1) 50%,rgba(246,41,12,1) 51%,rgba(240,47,23,1) 71%,rgba(231,56,39,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(left, rgba(248,80,50,1) 0%,rgba(241,111,92,1) 50%,rgba(246,41,12,1) 51%,rgba(240,47,23,1) 71%,rgba(231,56,39,1) 100%); /* IE10+ */
background: linear-gradient(to right, rgba(248,80,50,1) 0%,rgba(241,111,92,1) 50%,rgba(246,41,12,1) 51%,rgba(240,47,23,1) 71%,rgba(231,56,39,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f85032', endColorstr='#e73827',GradientType=1 ); /* IE6-8 */
It states on the site about Internet Explorer Support:
Support for full multi-stop gradients with IE9 (using SVG). Add a "gradient" class to all your elements that have a gradient, and add the following override to your HTML to complete the IE9 support:
<!--[if gte IE 9]>
<style type="text/css">
.gradient {
filter: none;
}
</style>
<![endif]-->
AFAIK Internet Explorer 8 or below doesn't support multi stop gradients.
Example: http://jsbin.com/cager/2/

mikedidthis
- 4,899
- 3
- 28
- 43
-
@punitsharma seems fine my end: http://i.imgur.com/LzKzqAs.png I would suggest you update the question with an actual example that isn't working. – mikedidthis Jun 03 '14 at 10:44
-
could you please tell me how do i generate SVG image if i want another gradient. – punit sharma Jun 03 '14 at 10:56
-
Use the generator at http://www.colorzilla.com/gradient-editor/ and make sure you include IE9 support. – mikedidthis Jun 03 '14 at 11:00
-
Thanks @mikedidthis.. i have one more question how do i use text greadient. – punit sharma Jun 03 '14 at 11:06
-
2@punitsharma urm... that's a completely different question. I would ask a new question. – mikedidthis Jun 03 '14 at 11:12
0
I think your parameters are in the wrong order (but I don't have an IE 8 or 9 version to hand to test it. Try:
-ms-filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#f85032, endColorstr=#e73827 );

Samih
- 1,078
- 9
- 15
-
@punitsharma I edited it slightly, can you try again? Also be aware that it won't look **exactly** like the newer browsers because this is a simple rather than multi-stop gradient. – Samih Jun 03 '14 at 10:07
-
Then sorry but since I don't have an IE8 or 9 instance to hand I can't help much more :-/ – Samih Jun 03 '14 at 11:00