I have a div
with a gradient background as well as a background image. It works great in all the major browsers except ie9. I have both displaying, however I can't figure out how to position the background image.
using the appropriate browser prefix where necessary I use the following:
background: url("../images/green-home-icon.png") no-repeat center top 10px, linear-gradient(top, @top-color 0%,@bottom-color 100%);
But in IE9 I use filter
as that is the only css
way to do this:
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/green-home-icon.png') progid:DXImageTransform.Microsoft.gradient( startColorstr='@{top-color}', endColorstr='@{bottom-color}',GradientType=0);
Is there a way to position the background image in IE9 while keeping the gradient just like we can in other browsers? I would like the image to be centered in the div
. I would preferably like to do this without having to add additional elements.
Here is a fiddle. It only has the filter for IE9.