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 position footer correctly with css?

    How to center three DIVS with other HTML tags inside one parent DIV [duplicate]

    How to only have margin between child and not with parent in CSS?

    CSS animation - How to fill in “starting from border”?

    how to make css tooltip not push elements outline in FF

    How to wait a while before adding elements in css? javascript?

    how to connect circles with lines without ovelaping

    jQuery wait for show()? Getting wrong data

    How to make the menu contents center aligned?

    how to set background-image to pseudo element?

    How can I use css files in django?

    Hiding and showing
      and
    • on click using Javascript

    multiple CSS classes, how they work and WHY do it this way? [duplicate]

    How can I make an unclickable HTML “Ghost” Div?

    How to remove space between two buttons in a table row or “column”?

    How-to mix fixed and percentage heights/width using css without javascript

    How to get align=“center” effect in CSS and be XHTML compliant and have it work on most browsers

    How make to flow around a triangular block?

    How to use css for the hover effect in another div?

    How to center
      in a page?

    How to bring DIV2 to top WRT DIV1?

    How to change ol bullets for clickable images

    How to position an icon in a metro-like web GUI? (images included)

    How to develop two different menu bars for a website (one for all users, and the other one for the Admin) in ASP.NET webfroms?

    How to make a bullet of an image slider look different while is active?

    Webpack bundle does not show css

    How can I fix Buttongroup Dropdowntoggle-Buttons in Bootstrap?

    CSS: how to refer to second child class of a div

    hide/show element with add/removeClass with CSS transition

    How to make a div fall on hover and stay at at the bottom of the page using jquery or css?