Mohammad Shohel Rana
Mohammad Shohel Rana

Reputation: 77

Cross browser compatibility issue of Internet Explorer 6, 7 and 8 for png/jpg image used as background of an html element

When I use png/jpg image as background of an element of my html document, it's not compatible with Internet Explorer 6, 7 and 8. How can I fix this cross browser compatibility issue ?

Upvotes: 0

Views: 92

Answers (1)

Mohammad Shohel Rana
Mohammad Shohel Rana

Reputation: 77

Alhamdulillah ! I have solved my issue.

When I use the background property with the value of rgba colour like

background: url("images/cross.png") no-repeat scroll left center rgba(0,0,0,0,),

the code is not compatible with IE 6,7 and 8. It doesn't matter whether the image is png or jpg.

So, we have to use the property without colour or with hex colour code like

background: url("images/cross.png") no-repeat scroll left center; or background: url("images/cross.png") no-repeat scroll left center #000;

Then it'll be compatible.

Thanks

Upvotes: 1

Related Questions