3

I'm currently building a parallax site, it works on all browsers apart from the exception of IE8 due to using background-size.

I have tried ms filters just wondering if anyone else has a solution.

section {
width: 100%;
position: relative;
overflow-x: hidden;
z-index: 0;

}

.parallax__one {
background: url("../Images/parallex__bg__1.png") 0px 0 no-repeat fixed;
    filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(     src='../Images/parallex__bg__1.png', sizingMethod='scale');
    -ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader( src='../Images/parallex__bg__1.png', sizingMethod='scale')";
    /* background size */
    -webkit-background-size: 100% 100%;
-moz-background-size: 100% 100%;
-ms-background-size: 100% 100%;
-o-background-size: 100% 100%;
background-size: 100% 100%; 

}

1 Answers1

0

background-size does not work in IE8

You will have to use something like this polyfill.

https://github.com/louisremi/background-size-polyfill


Instructions from the readme:

Upload backgroundsize.min.htc to your website, along with the .htaccess that will send the mime-type required by IE (Apache only — it's built in nginx, node and IIS).

Everywhere you use background-size in your CSS, add a reference to this file.

.selector { 
    background-size: cover;
    /* The url is relative to the document, not to the css file! */
    /* Prefer absolute urls to avoid confusion. */
    -ms-behavior: url(/backgroundsize.min.htc);
}

The elements styled this way should have a position: relative; or position: fixed; and a z-index. If not, they will be given a position: relative; and z-index: 0;.

ryanwinchester
  • 11,737
  • 5
  • 27
  • 45