HOME       >>       Programming

How To Auto Stretch An Iframe?

Nani Cheri


I have this website I'm working on which has an iframe were all the links in my menus etc go to. All of that content I'v put in a table. The iframe itself (on my index page) is in a table to. But not every page I linked in the iframe is the same height. So would like to know if there is a solution that works to actually let the iframe automatically be resized to the page that loads in it. I just want the iframe on my index.html page to stretch automatically, so that I dont have to change the widths and all that stuff if I updated my pages, that load in the iframe. I dont want to use scrollbars so thats why I need it to expand automatically to the contents size.

Can anyone help me with this, bet it isn't that hard to do, but I can't seem to let the codes work in my site, that I found in google.


this is my site: http://forums.xisto.com/no_longer_exists/


go into frontpage rightclick on the iframe click on the iframe properties button and then hit the checkbox that says resizable in browser and click ok

Nani Cheri

I don't use frontpage I use Dreamweaver.Hello does anybody knows how to do this, gotta be somebody?????


Replying to Nani Cheri<iframe src="http://forums.xisto.com/no_longer_exists/; width="100%" height="100%" scrolling="no"></iframe>


JavaScript to Adjust iframeHow To Auto Stretch An Iframe?

Here's a post I found that might help. This requires only that the page inside the iframe be on the same domain as the page loading it. If that's not the case, it gets a lot more complicated.


Hope that helps.

-reply by Ben Faust



@iGuestHi!I get a 404-Not Found for the link you've sent across, but I get the idea you're suggesting - putting in some Javascript that can get the width of the document and re-size the iFrame accordingly. It's been only about 2 weeks since you've posted the link so I'm surprised the page went *poof*!The original poster's query is from way back in 2006, so I doubt it would be of much use if I were to write it up and post it here. If anyone does still need the solution though, holler back on this thread and I'll work it out.Regards,Nitin Reddy


New linkHow To Auto Stretch An Iframe?

I went to that site and after using the search I found the article myself:


-reply by Craig



Re: Auto Stretch How To Auto Stretch An Iframe?I've found your article. It didn't help me at all. But found the solution from other searches. This post can help you re your problem: Auto Stretch An Iframe with Javascript Pagecan I ask a question? how did you find this site (trap17dotcom)? is it worth to be a member?-reply by Guy can help


Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.