Changing image sizes proportionally using CSS

This is a known problem with CSS resizing. Unless all images have the same proportion, you have no way to do this via CSS. The best approach would be to have a container, and resize one of the dimensions (always the same) of the images. In my example I resized the width. If the container … Read more

HTML Width Percentage

max-width — the maximum width an element can reach width the width of the element Your code indicates that the #wrapper is to be 98% of the viewport but it should never be wider than 1080px. If 98% of the window width is greater than 1020px, the #wrapper will not get any wider! Please comment if you don’t understand 🙂

How to implement max-font-size?

font-size: 3vw; means that the font size will be 3% of the viewport width. So when the viewport width is 1200px – the font size will be 3% * 1200px = 36px. So a max-font-size of 36px can be easily implemented using a single media query to override the default 3vw font-size value. Codepen demo (Resize Browser) … Read more