0

I'm trying to fill that my image fits the size of the DIV. I already find that "background-size: contain" is not working for Internet Explorer 8.

Is there a possible workaround for my specific code.

    .thumb {
        /* Select a maximum height and width to allot for each thumbnail. Set margin size here as well. */
        height: 125px;
        width: 135px;
        /* Do not edit these properties. */
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
    }

In my javascript:

            $('.thumb:' + place).css("background-image", 'url(' + entry.thumbnailURL + ')');
            $('.thumb:' + place).css("filter", 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=' + entry.thumbnailURL + ',sizingMethod='scale')');
            $('.thumb:' + place).css("-ms-filter", 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=' + entry.thumbnailURL + ',sizingMethod='scale')');
Timvdb92
  • 63
  • 9

1 Answers1

0

You get an Unexpected identifier because of these two bits:

 ',sizingMethod='scale')');

You must change it to

',sizingMethod=\'scale\')');

or

',sizingMethod="scale")');