I am working with images, and I ran across a problem with aspect ratios.
img {
max-width: 80px; /* Also works with percentage value like 100% */
height: auto;
}
This image is originally 400x400 pixels, but should get resized by the CSS:
Let's say the author of the HTML deliberately wants
the height to be half the value of the width,
this CSS will ignore the HTML author's wishes, which may or may not be what you want:
