Reputation: 51
I got a problem with the iframe height just on Chrome. All anothers common browsers like IE, Opera, Safari, and FF works fine.
<iframe runat="server" id="ifTest" name="ifTest" frameborder="0" height="790px"
width="960px" style="position:inherit;"></iframe>
in all browsers this works fine, but in Chrome, appears a big white space at the bottom of the page, after the footer. If I drop the Height in the iframe, the iframe will be tiny but without the big white space at the bottom of the page after the footer.
Can anyone help me ?
Upvotes: 3
Views: 5727
Reputation: 7990
It helps in my case ( working in Chrome & Moz.Firefox ):
iframe {
height:100vh; // without it doesn't works
width: 100%;
overflow:hidden;
}
<iframe frameborder="0" name="iframe_article"></iframe>
Upvotes: 0
Reputation: 1
But the iframe call a foreign page. I don't have this page in my solution. I tried some javascript like
function resizeFrame(f) {
f.style.height = f.contentWindow.document.body.scrollHeight + "px";
}
Upvotes: 0
Reputation: 5119
Try
iframe#ifTest{
width:960px;
height:790px;
}
and remove the width and height from the iframe tag
Upvotes: 1