Inline Frame that automatically adjusts its height for the source page

Last year, I was working on our MULPROJ layout, and the type of layout I was making needed an iframe whose height is auto resized according to the source page’s content. This means that there should be no vertical scrollbar in the iframe, it simply adjusts itself vertically.

I thought that it wasn’t possible to do this but I found a JavaScript code that can do the trick, and I just want to share it with you. 😉

Save the above code as iframe.html, or whatever you like.
Remember to create the file yourPage.html in the same folder as your previous html file.

I stumbled upon it on: this forum thread.

I also did a little editing.

Related Posts:

Posts that may be related to "Inline Frame that automatically adjusts its height for the source page":


A Filipino programmer and baker. When I have time to spare, I blog, play video games, watch series (usually anime), cook dishes, draw, or spend a little time with pets. When I have the rare luxury of time, I get to travel and record song covers too! Running small-time online dessert shops Cookies PH and Catzie's Cakery.

Leave a Reply

Your email address will not be published. Required fields are marked *