Showing posts with label iframe. Show all posts
Showing posts with label iframe. Show all posts

21 April 2021

Responsive iFrame and make iframe height dynamic based on content inside- JQUERY/Javascript

 Responsive iFrame and make iframe height dynamic based on content inside- JQUERY/Javascript


https://stackoverflow.com/questions/9162933/make-iframe-height-dynamic-based-on-content-inside-jquery-javascript


'Rather than using javscript/jquery the easiest way I found is:

<iframe style="min-height:98vh" src="http://yourdomain.com" width="100%"></iframe>
Here 1vh = 1% of Browser window height. So the theoretical value of height to be set is 100vh but practically 98vh did the magic.

'


24 March 2021

How can I scale the content of an iFrame?

How can I scale the content of an iFrame?


<iframe src="https://xxx.html" style="border:none; overflow: hidden; position: relative; width: 1044px; height: 1730px; -ms-zoom: 0.5; -moz-transform: scale(0.5); -moz-transform-origin: 0px 0; -o-transform: scale(0.5); -o-transform-origin: 0 0; -webkit-transform: scale(0.5); -webkit-transform-origin: 0 0;" title="xxx"></iframe>