Can You Scale an Iframe

Scaling (or zooming) the content of an iFrame can be useful when you are trying to display an object in an area that does not match its original size. The below code scales an iFrame that is 1000 pixels wide down to 710px.

How do I shrink an iframe?

6 Answers. That’s easy enough, just put the iframe in a div and force the height/width that you want. That way as you shrink or expand you wont change the pages formatting.

How do I change the width and height of a video in iframe?

You plug in your aspect ratio in the padding-bottom property of the wrapper div, and it is computed by the formula: video_height / video_width * 100 . For example, a video with the 16:9 aspect ratio that gives you 9 / 16 * 100 = 56.25% .

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest