Im using the following to scale down webpages in an iframe and it works great for ordinary webpages, but if the webpage is a mobile webpage(and therefor only 320px wide) then I would like to scale it down with -webkit-transform: scale(0.90); instead of 0.30.
<div id="iframewrap">
<iframe id="iframeid" src="http://www.mypage.com" name="iframeName" marginwidth="0" marginheight="0" scrolling="yes" frameborder="0" height="100%"></iframe>
</div>
<style type="text/css">
#iframewrap { width: 320px; padding: 0px; top:45px; position:relative; overflow:hidden;}
#iframeid { width:320px; height:100%; margin:10px 10px 10px 10px; overflow:hidden;}
#iframeid {
-ms-zoom: 0.30;
-moz-transform: scale(0.30);
-moz-transform-origin: 0 0;
-o-transform: scale(0.30);
-o-transform-origin: 0 0;
-webkit-transform: scale(0.30);
-webkit-transform-origin: 0 0;
}
</style>
I have tryed a lot of stuff from googling to get the width of the page that is loaded in the iframe, to try and calculate and set the width of the iframe to something like (content width * 0.90)
Or if you have any other suggestions? Thanks.