How do I resize an image in IE 8


Tags: css,internet-explorer,image-resizing

Problem :

I have an image that is 90px x 90px (it's a jpg file) and I can't figure out how to make it 60px by 60px in internet explorer. I looked at a few sites already which told me to use this css style:

.img { -ms-interpolation-mode: bicubic; }

but nothing happened. This is the css I'm using currently which works really well in fireforx and chrome:

.img {
    horiz-align: center;
    width: 60px;
    height: 60px;
    margin: 10px;
    border: 1px rgb(218, 218, 218) solid;
    background: #C4C4C4 no-repeat 0 0;
}


Solution :

The issue with your original code is you're specifying img as a class i.e .img rather than img

Here's 2 ways to do this. 1st with no css:

<img src="your-image.jpg" alt="" width="60" height="60" />

2nd with CSS:

<img src="your-image.jpg" alt="" class="image-resize" />

...

img.image-resize { 
  width: 60px;
  height: 60px; }

    CSS Howto..

    How to make jQuery dialog popup stay in the center of browser (specific situation)

    How to deal with `rowspan` and background colors within a table?

    Stylized HR is not showing properly in IE

    How do I resize a div relative to browser window size?

    How to reduce http request using PHP when HTML Doc loads JS or CSS? [closed]

    How to add elements to an specified position without influence of other elements?

    how to create arrow between two background images in css

    How make a page fit on any screen with any orientation [closed]

    How do I add an underline to unvisited links only?

    How to make carousel have a max width, and load without resize

    How to vary the tone of an image dynamically using only css?

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

    How to override position : absolute in css?

    How to decode data:image/png:base64… to a real image using javascript

    Javascript/Jquery How to catch the use of a CSS class

    How can I :hover over different links in one line while getting the spacing correct?

    How to inspect value both in Mozilla Firebug?

    How to use media queries in css

    How to add vertical scrolling to Windows 8 app in snapped view

    How to find all elements with a particular CSS style, without a JS library?

    How to apply the grayscale jquery plugin to a background image?

    CSS - How to break a line only at division borders

    How to make SpriteSpin responsive?

    How to make a span tag wider with an alphabet inside?

    How can I show hidden element when it has focus?

    How to hide/show the content of a div with dynamic height?

    how to achieve this this horizontal line from css or bootstrap

    How to wrap text inside an iframe with designMode on, using css and also javascript if necessary?

    How to remove curved line in HTML/CSS

    How to apply multiple transforms in CSS?