CSS: How to preserve aspect ratio for an HTML element
The Problem: How to set aspect ratio for a HTML element In my case I needed that for a slider. But sometimes it can be required by some fancy layout or gallery component. The Solution: It’s simpler than you think! Lets assume we want to preserve 4:3 aspect ratio for slide placeholder to display an… Read more CSS: How to preserve aspect ratio for an HTML element