2

By referring to this website:http://css3pie.com/documentation/supported-css3-features/

"background-size (will always use the image's intrinsic size) — this is supported as of PIE 2.0 beta"

Based on the documentation, background-size is now supported in PIE 2.0 beta, however, I'm unclear on how to make it works on IE8.

Before making changes:

.navbar-inverse {
background:url('header_images/menu_bg.png');
background-size: 100% 50px;
}

The codes work fine for IE9 and IE10; but I want it works on IE8 too, so I added two lines:

.navbar-inverse {
background:url('header_images/menu_bg.png');
background-size: 100% 50px;
-pie-background: url('header7/header_images/menu_bg.png') no-repeat 100% 100% / 100% 50px;
behavior: url(header7/pie/PIE.php);

}

The background-size is still not functioning. It there anything wrong with my codes?

user2991183
  • 683
  • 1
  • 12
  • 23
  • Answered previously here: http://stackoverflow.com/questions/4885145/ie-8-background-size-fix – wesruv Feb 14 '14 at 16:20

2 Answers2

2

I ran into a similar issue with CSS3PIE.

I found my fix here

.pie_bg{
  background: url("../images/background.jpg") left top no-repeat; 
  background-size: 100% auto;
  -pie-background: url("../images/background.jpg") left top / 100% auto no-repeat;
}

/* NB Image path must be relative to the html doc, not the css file. Alternatively, it can be an absolute path e.g. url("http://mywebsite.com/images/background.jpg")*/
Sagar Pudi
  • 4,634
  • 3
  • 32
  • 51
susu
  • 21
  • 2
0

IE8 does not support background-size property.

try out this polyfill from github.

Using this should allow you to use background-size property in IE8 without any issues.

Sagar Pudi
  • 4,634
  • 3
  • 32
  • 51
Varun
  • 56
  • 3