Reputation: 877
I have the following code that sizes the iframe perfectly on tablets,computers, etc. and iphones. It creates an iframe approximately half the size of the entire screen on a droid phone. It fits the entire screen upon a refresh. How could I approach to fix this so that the iframe fits the entire page on a droid phone on first load?
<html>
<head>
</head>
<body style="margin:0px;padding:0px;overflow:hidden">
<iframe src="/index2.php" frameborder="0" style="overflow:hidden;height:100%;width:100%" >
</iframe>
</body>
</html>
Upvotes: 0
Views: 32
Reputation: 32511
You need to tell the browser to fill the whole page with the main document. Use this:
html, body {
width: 100%;
height: 100%;
}
Upvotes: 1