Search code examples
cssinternet-explorer-8filterinternet-explorer-7

IE7 ms background filter not working


Short of it is, I'm trying to scale the background image to 100%.

I came across the filter that achieves that goal, however I cant seem to get it to work in ie 7/8. Code is below.

  body {
background-image: url(../images/background.gif);
background-size: 100% 100%;
height: 100%;
width: 100%;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/background.gif', sizingMethod='scale');
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/background.gif', sizingMethod='scale')";
}

Thank you


Solution

  • Background-size attributes are not very flexible on cross-browser compatibility. It doesn't work because 'background-size' is not supported bellow IE9:

    http://caniuse.com/background-img-opts

    Check this post for more detailed information: http://css-tricks.com/perfect-full-page-background-image/

    I suggest you find another solution to make this more compatible.