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

Doesn't work... #32

Open TakanashiOuken opened 10 years ago

TakanashiOuken commented 10 years ago

For a second it worked in IE8, but it doesn't work anymore after a reload. Could this be because the div with background-size is position absolute?

jefferyto commented 10 years ago

CSS positioning should not affect it... Is there a test link we can view?

davidcroda commented 10 years ago

I had this issue as well. Resizing the browser would cause the polyfill to appear. I triaged by replacing the call to handlePropertychange at the end of the init() function with handleResize.

jefferyto commented 10 years ago

@davidcroda can you post a link or jsFiddle with a minimal test case?

marissalerer commented 10 years ago

I am having a similar issue. Resizing the browser seems to make the images appear. http://composedcreative.com/clients/esteelauder/makeup/

thomasduenser commented 10 years ago

Same issue as well - Images appear on window resize, but not on first page load. My container's are js-calculated, becuase it's a fullscreen slideshow - maybe that's the problem? How can I "force" the polyfill to activate when everything's calculated?

codeofsumit commented 10 years ago

I have the same issue. Images appear after a window resize only.

jefferyto commented 10 years ago

@marissalerer Sorry I haven't had time to look at your page yet, will try to in the next few days. Would be very helpful if you can reduce it down to a minimal test case.

@thomasduenser Does this help? https://github.com/louisremi/background-size-polyfill/issues/31#issuecomment-27583864

@Sumit8 Are you also calculating the container size using JS like @thomasduenser ?

jefferyto commented 10 years ago

Everyone else: Please comment here only if you are experiencing the same issue as the OP:

For a second it worked in IE8, but it doesn't work anymore after a reload.

If not, please open a new ticket (with a test case / jsFiddle) - thanks!

jefferyto commented 10 years ago

@marissalerer Looks like your site has two references to the polyfill (/lauder/backgroundsize.min.htc and /backgroundsize.min.htc), but both return 404... Was this a recent change?