Resize iframe height based on it's content


/ Published in: JavaScript
Save to your folder(s)

Sometimes iframes are unavoidable, and in those cases you usually don't want it to be apparent there is one. This will find the height of the iframed contents and resize the iframe accordingly, making it appear to be part of the page. Almost positive there's a better way to do this but this worked the most consistently across browsers so I'm saving it here. Suggestions welcome, especially on methods to do the same in jQuery.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.