How do I make background-size work in IE8?

Tags: css,internet-explorer-8,internet-explorer-7,background-image

Problem :

I have an image which is 250px wide by 100px high. I want to use this css rule:

background-size: 125px 50px;

How do I do it? I don't want to know how to make an image stretch to fill the div, or the browser window, or whatever else can be done with background:cover. I want the background image to be a specific size, irrespective of whether that may be larger or smaller or whatever compared to the containing div. Yes, it does (unfortunately) need to be a background image. It needs to work in IE7 and 8; background-size already covers all the other browsers.

Solution :

This question got answered intensively here:

How do I make background-size work in IE?

The most popular fix is this background-size polyfill:

    CSS Howto..

    How to stop ReSharper removing spaces after css properties

    How to make 1 table scrollable with fixed header without affecting other tables in Bootstrap

    Why was ::selection removed from the CSS Selectors spec, and how does its specificity work against type selectors?

    How can I change the shape of a gridview to circular?

    How do I change the admin header color in Magento?

    How to make the newly appended html code keep the original css style?

    How to do fade-in and fade-out with JavaScript and CSS

    How to make overflow blocks working well ()

    How to mix url string & attribute value in CSS content property? [duplicate]

    How to expand CSS column to available space?

    How can I wrap content around a UL CSS Menu so content is seamless?

    How to make two separate, independent columns (using html and css)

    How to find out if the user scrolled to the end of a HTML container with jQuery?

    How to only get the 'box-shadow-right' that cuts off when you reach a border?

    How can I override inline styles with external CSS?

    How can i put random values to css properties using JQuery?

    How to make first letter lowercase in span with css?

    How do I tell a page to ignore internal CSS in favor of external CSS?

    How to vertical-align to x-height?

    How do I fit a fieldset to the size of its content with CSS?

    How to toggle the contents of span when clicked?

    How can I manage the dimansions of #homeSub in CSS so it won't diappear when I move my mouse from homeBox to homeSub?

    How to do auto slide for divs [closed]

    How to hide second row of a table using css?

    how to make a line between div boxes - simple timeline experiment

    How to add threshhold onclick() jQuery?

    Google chart - how to change a css property for the whole table

    How to place 2 div side by side (alternative solution)

    CSS How to target element without a tag

    How do I apply CSS rules from a local domain to content in an iFrame from another domain