View RSS Feed


Seamless iframes

Rate this Entry
There are many scripts on the Internet that aim to set the height of the iframe element to accommodate the contained document's height, so that the window scrollbars can be used instead of iframe scrollbars for a more seamless appearance. Some rather well-known scripts are those created by David Bradshaw (, jQuery based) and Dynamic Web Coding ( The DynamicDrive script ( is also fairly well known.

I tested the scripts and found the following issues:
- None of the above mentioned scripts produce iframes whose appearances are really seamless in the strongest sense of the word.
- The DynWeb iframes get scrollbars or superfluous space when the window is resized.
- The iframes produced by the Bradshaw script don't have enough height when the window is first resized and then reloaded, or vice versa. When this happens, we must click inside the iframe or on the toggle content button to get the correct height. Sometimes, simply resizing the window cuts off the bottom of the iframe's content.

With these observations in mind, I wrote my own 'seamless iframe script', see this. As far as I can see, it functions well. But one never knows, so if you observe problems with the script please tell me. It's free for use, of course.

(This replaces another script I wrote about seamless iframes, see The current script replaces that one).

Submit "Seamless iframes" to Submit "Seamless iframes" to StumbleUpon Submit "Seamless iframes" to Google Submit "Seamless iframes" to Digg

Updated 04-22-2017 at 08:19 AM by molendijk

Tags: None Add / Edit Tags


  1. molendijk's Avatar
    I used the code that gives the iframes the correct height in another script that creates iframes on the fly, see this.
    Updated 04-28-2017 at 12:06 PM by molendijk