Thursday, November 15, 2018

Responsive image not resizing proportionately.

Working a redesign the image on the home page were responding to the the size of the browser, but only the width was changing. Found this article on the web that solved my problem.

http://www.456bereastreet.com/archive/201306/how_to_proportionally_scale_images_that_have_dimension_attributes/

The CSS for the img was:

img {      max-width: 100%;
}

img {
max-width: 100%;
height: auto;
}

I hope this helps someone else.

0 Comments

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>