Fixing Background-size 100% for IE8?

css, internet-explorer-8

Solution

Unlike all other `url()` paths in CSS which are relative to the directory where your stylesheet is located, the `src` path is relative to the page where the stylesheet is used.

For example, if your page is located in the root directory, and your stylesheet is located in its own directory next to the `img` directory (hence the need for `..`), you need to change `src` to make it relative to the root directory, like so:

  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/img/bg.png', sizingMethod='scale')

Problem

I have the following css to get a background image to stretch 100% inside a section. ``` .sectionclass { background: url('../img/bg.png') 50% 0 no-repeat fixed; background-size:100%; width: 100%; position: relative; line-height: 2; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../img/bg.png', sizingMethod='scale'); } ``` It works well in the latest version of IE but when I look at IE7 or IE8 the background will not go full width. What would be the easiest way to solve this problem?

Original source