For a responsive design, i would like to scale down some images:
img {
width:100%;
height:auto;
}
This works as expected, but if th
Not answering for the scale bug for image size limit this could work:
img {
max-height: max-content;
}
Put the images in a <div>
and give that <div>
a max-width.
CSS
#test {
max-width: 400px;
}
img {
width:100%;
height:auto;
}
HTML
<div id="test">
<img src="http://a.dilcdn.com/bl/wp-content/uploads/sites/8/2012/09/02-11.jpg" />
</div>
JSfiddle
You could use max-width
to prevent image width from becoming larger than original size.
img {
width: auto;
max-width: 100%;
height: auto;
}