How to implement constant width to height ratio with CSS and HTML
Brief explanation and code sample:
Given an element of variable width, it will ensure its height remains proportionate in a responsive fashion (i.e., its width to height ratio remains constant).
padding-top on the ::before pseudo-element causes the h...
saintvandora.hashnode.dev1 min read