aateeque
aateeque

Reputation: 2231

MS IE relative path syntax in CSS

I am using the following CSS code:

body
{
  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='//images/homebg.png', sizingMethod='scale');
  -ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='//images/homebg.png', sizingMethod='scale')";
  background-image: url('../images/homebg.png');
}

As you can see I want to cover a background image in MS IE on this page. This CSS code sits in a /styles/ directory whereas the image is in the /images/ directory

How do I declare a relative path to the background image from within this CSS code?

Also, am I doing this the right way- i.e. apply the AlphaImageLoader filter to achieve the CSS background-size: cover; effect?

Thanks!

Upvotes: 2

Views: 2698

Answers (1)

Aaron
Aaron

Reputation: 10848

Have you tried entering

../images/homebg.png

As for the filter itself, it looks okay to me.

Upvotes: 2

Related Questions