There isthe experimentalintrinsicsizeattributethat I could imagine being quite nice for iframes in addition to images. Thanks for contributing an answer to Stack Overflow! But what about other aspect rations? In fact, this is what popular platforms like Youtube and Vimeo do. However I want to allow clients to embed this page easily on their website. So how do you figure out the padding-top for say an image thats 1127.34591.44? to create a fully functional web page; CSS animations. Could very old employee stock options still be accessible and viable? Two common video aspect ratios are 4:3 (the universal video format of the 20th century), and 16:9 (universal for HD television and European digital television, and for YouTube videos). The 3 steps to create a responsive iframe that keeps its aspect ratio: Add a container for the iframe, determine the aspect ratio percentage, hide the overflow, and set its position to relative. Height will remain big and unproportional. Meaning of a quantum field given by an operator-valued distribution. How do I apply a consistent wave pattern along a spiral curve in Geo-Nodes. Why don't we get infinite energy from a continous emission spectrum? A video or image can be cropped to any size. Have you tried additionally setting height of the iframe? Add some CSS to remove the iframe border, lazyload it, and remove unneeded attributes. You can create a ratio function thatll calculate the padding percentage needed for a particular aspect ratio, then a mixin to generate the styles. The term responsive iframe is a little broad. You can overcome this problem by using JS. you should be, my sites design was heavily inspired by it hope you like it. This snippet is free and open source hence you can use it in your Why does the Angel of the Lord say: you have not withheld your son from me in Genesis? My name is Ben Marshall & Ive been developing websites for over 20 years. WebBootstrap Components Responsive embed Responsive embed Allow browsers to determine video or slideshow dimensions based on the width of their containing block by creating an intrinsic ratio that will properly scale on any device. Page 01 - Written rules are directly applied to elements of parent class i.e