0

I have an iFrame in fullscreen using tips from: "Full screen" <iframe> and yes, it's working. The problem is that the page the iFrame is referring to is responsive, but the responsivines of this site is not working inside the iFrame.

So I thought adding viewport tag would solve the problem, and yes, it's scaling properly but this makes it impossible to scroll on the page (iPhone).

Is there a way to solve this issue? Maybe some JS could fix this but then I don't know how. The style.css contains CSS-reset.

<!DOCTYPE HTML>
<html>
    <head>
        <title>Test</title>
        <meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=yes, minimum-scale=1.0, maximum-scale=2.0">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="shortcut icon" type="image/x-icon" href="icon.ico" />
        <link rel="stylesheet" type="text/css" href="style.css" />
    </head>
    <body>
        <iframe src="http://something.com" style="position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;">
          Your browser doesn't support IFrames
        </iframe>
    </body>
</html>
Community
  • 1
  • 1
JLR
  • 723
  • 1
  • 8
  • 17
  • I don't get the problem. I tried linking to this chart - http://stunni.ng/charts/index.php?call=Chart&type=loadchart&output=html&chart_id=1463 - and it works fine. – JasTonAChair Dec 17 '14 at 12:03
  • @JasTonAChair Thanks for reply. On computers it works fine as it seems. On my iPhone it's not working that fine anymore and I have tested this on Android phones as well in a nearby shop. I tested your link and it works fine on computers but not in my iPhone. Did you manage to get it to work on your mobile phone with the code above? – JLR Dec 17 '14 at 15:01
  • Right, phone, I get it now. I didn't use a phone. I'll chuck it on my server tonight and see how it goes – JasTonAChair Dec 17 '14 at 23:31
  • Related: http://stackoverflow.com/questions/5867985/iframe-auto-100-height/27853830#27853830 – Josh Crozier Mar 30 '15 at 23:58

0 Answers0