Shouldn’t the images shrink if I resize the browser window if I have the Height: 100%; width:auto; rule applied anyway, No matter if I even have media queries in the CSS? Cross-browser window resize event using JavaScript/jQuery. It is usually better to use an image that is the correct size in the first place than to resize it with HTML. If the background-size property is set to "contain", the Writing code in comment? Cropping and Resizing Images with CSS . Adding the CSS class to each media query with a different size will make the browser render the desired image size to each differently sized browser window. This is because resizing it with HTML doesn't reduce the file size — the full file still has to be downloaded before it can be resized. Get code examples like "how to resize image in html css" instantly right from your google search results with the Grepper Chrome Extension. The media attribute is optional, and accepts the media queries you find in The element works similar to the