简体   繁体   中英

Iframe Height in the Google Chrome

I have an iFrame inside my .aspx page that redirect to a external page, that are outside of my solution.

The problem that I got is in the Google Chrome, the Height of the iFrame seems change the Height of the .aspx page. This occurs just on the Google Chrome.

<iframe runat="server" id="ifTest" name="ifTest" frameborder="0" height="790px"
width="960px" class="iframeTest" style="position:inherit;"></iframe>

The CSS class iframeTest is outside of my solution, how I said, my iframe show a page that are outside of my solution.

For exemple, this is a sample of the iframe in the code-behind to show a page that are outside of my solution.

this.ifTest.Attributes["src"] = "the_page_link_that_i_want";          

My problem is just the iframe Height in the Google Chrome, because the page in Google Chrome shows a big white space after the footer.

Remove the px in the width and height attributes in the iframe.

Eg

<iframe runat="server" id="ifTest" name="ifTest" frameborder="0" height="790"
width="960" class="iframeTest" style="position:inherit;"></iframe>

AND/OR

add an extra style :

iframe{ width:960px; height:790px;}

*Let me know if this helps, otherwise I can investigate more...is there some link I can have a look at? Or a JSfiddle link?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM