Aspect ratio with CSS aka the padding hack
When working with media whether it’s an image or a video, sometimes you have to preserve its initial proportions (aspect ratio). In this guide, I’ll try to explain how exactly you can achieve such a result with CSS.