How to preserve aspect ratio for embedded iframes?

Alright, the cheapest way to achieve resizing according to viewport/content width is by simply adding some CSS for your iframe: And the iframe is as wide as the container you put him in. However, the height can’t be controlled that easily. To preserve that aspect ratio, you need a wrapper div, let’s call it .aspect-ratio:
For More Information Please Refer:


You May Also Like to Read: