I have styling for a <div>
in my page as below;
.maintab1{
background:rgb(0,65,135);
background:-moz-linear-gradient(-45deg, rgba(0,65,135,1) 0%, rgba(30,127,201,1) 29%, rgba(53,154,255,1) 62%);
background:-webkit-gradient(linear, left top, right bottom, color-stop(0%,rgba(0,65,135,1)), color-stop(29%,rgba(30,127,201,1)), color-stop(62%,rgba(53,154,255,1)));
background:-webkit-linear-gradient(-45deg, rgba(0,65,135,1) 0%,rgba(30,127,201,1) 29%,rgba(53,154,255,1) 62%);
background:-o-linear-gradient(-45deg, rgba(0,65,135,1) 0%,rgba(30,127,201,1) 29%,rgba(53,154,255,1) 62%);
background:-ms-linear-gradient(-45deg, rgba(0,65,135,1) 0%,rgba(30,127,201,1) 29%,rgba(53,154,255,1) 62%);
background:linear-gradient(-45deg, rgba(0,65,135,1) 0%,rgba(30,127,201,1) 29%,rgba(53,154,255,1) 62%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#004187', endColorstr='#359aff',GradientType=1 );
}
I want to include an image image.png
as the background image along with the CSS3 gradient.
I checked this stackoverflow question and this article and ended up with the following code;
background-image:url(image.png), -moz-linear-gradient(-45deg, rgba(0,65,135,1) 0%, rgba(30,127,201,1) 29%, rgba(53,154,255,1) 62%);
and applied the for all other attributes and is working fine.
But this is not working in IE8 (only tested in IE8 and FF3+) and believe not going to work in older ones. The gradient is working perfect, but the image is not coming.
Can somebody tell me the way to display background image along with CSS3 gradient other than the way I already mentioned?