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 overlap a div to an another div without changing their positions - Css

    Page not displaying, error not shown in console?

    How to Change the hover image in CSS

    How do I center the twitter bootstrap tabs on the page?

    How do you add more than one css class to an using image_tag?

    How to add physics to CSS animations?

    make the div (in css) to grow bottom-up? how?

    How do I get a fixed positioned footer, fixed width right column, left column for the rest using CSS lay-out?

    How to get just the responsive grid from Bootstrap 3?

    how to align css content string

    How to select two different elements with an XPath query

    How do I use CSS to create rounded corners in IE 8? [duplicate]

    Not sure how to use css selectors

    How to add and remove a current state to a link when another is clicked using jQuery

    How to reverse a sequence of CSS transitions and transforms which contain span:nth-child

    How to shorten this placeholder-transitioning CSS selector using sass/compass?

    How can I target an id=“last_name[]_field” with css

    How to center webpage content

    How do I continue to allow the user to click until a certain point?

    How to keep floated element from affecting “text-align: center” text?

    how to display tabs in more than one row having the extra tabs coming one row up rather than one row below?

    how to change single li element in a menu using lists?

    How to center align ion icon inside button?

    How do I get my List Items to move up a Little in CSS

    How to create a dotted shadowy effect on an image with CSS?

    How to use float and margin together?

    How to make my first-child in css work properly?

    How to apply Title Case in input box through css

    How to make a div to float left/right inside a centered div

    how to check css is valid for IE8