Konubinix' opinionated web of thoughts

Resize Videos Proportionally With Intrinsic Ratios | Ben Marshall

Fleeting

Resize Videos Proportionally with Intrinsic Ratios | Ben Marshall

.video-container { position: relative; height: 0; padding-bottom: 20%; * This should be changed to match the aspect ratio of your video * }

.video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

padding is the secret to the intrinsic ratio technique

a container that proportionally resizes itself