I need to zoom frame content only. Here in my web page I used zoom: 0.75; height: 520px; width: 800px;
. If I increase the zoom value it means that the frame size will be increased.
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<STYLE>
#frame { width: 800px; height: 520px; border: 1px solid black; }
#frame { zoom: 0.75; -moz-transform: scale(0.75); -moz-transform-origin: 0 0; }
</STYLE>
</HEAD>
<BODY>
<IFRAME id="frame" src="http://www.google.com"></IFRAME>
</BODY>
</HTML>
In the above sample HTML page I want to zoom the content of the IFRAME without changing the size of that IFRAME.
You should see the attribute "width=" after the URL in the iframe tag. Edit the width in pixels in quotations (" ") after the "width=" attribute. For example, if you want the width to be 300 pixels, you would enter "width="300px"" after the URL in the tag.
If you create an iframe, your site becomes vulnerable to cross-site attacks. You may get a submittable malicious web form, phishing your users' personal data. A malicious user can run a plug-in. A malicious user can change the source site URL.
To size the <iframe> , we ignore the width="560" height="315" element properties, and instead use the CSS properties width:100%;height:100%; . That's it: a full-width <iframe> with fixed aspect ratio.
Not sure this works with linked documents, but with locally hosted content the following works:
<IFRAME id="frame" src="local.pdf#zoom=100"></IFRAME>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With