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

Fix for percentage based background-positioning #39

Closed bcerc closed 2 years ago

bcerc commented 10 years ago

The background positioning was being calculated incorrectly. A percentage position should be based relatively to the element's size thus using element.clientWidth and element.clientHeight.