louisremi / background-size-polyfill

Adds support for background-size "cover" and "contain" to IE8
http://louisremi.github.com/background-size-polyfill/
MIT License
1.26k stars 359 forks source link

IE 8 error #3

Closed ururk closed 11 years ago

ururk commented 11 years ago

I'm getting an error in IE 8:

Invalid argument. -> line 217

img.style.top = -delta + "px";

This doesn't always happen. I can see that an image has been drawn in the upper-left corner of my containing div. It isn't the image shrunk down - rather, it is an icon of a picture. Other times it works OK. Is there an issue if the image is large and hasn't finished loading? That really shouldn't be the case (I don't think) because the background image loads then flashes off.

ururk commented 11 years ago

It looks like the initial image scales/displays properly, but then the script continues to run. I'm trying to determine if there is something wrong with my code that prevents this form working correctly.

ururk commented 11 years ago

Fixed! It was a simple issue:

section .slides div{ }

This was evaluating for (what appeared) to be every div on the page, not just the targeted div.

louisremi commented 11 years ago

alright, closing this issue then.