"Seamless" Iframe Content

The content you see here is displayed in a div. It was initially loaded into a hidden iframe. A function called onload of the iframe copied the content from iframe to div.

Since the body content of the iframed document is incorporated into the current document by the code used here, styles used by the current document are applied and regular links replace the current document. This emulates the new HTML5 seamless iframe attribute that is not yet supported by browsers.

Since the div's height is not set in this example, it shrinks and expands according to the amount of content in the document loaded into the iframe so the regular window scrollbars are used rather than iframe scrollbars.

Another option for avoiding iframe scrollbars sets iframe height to display its full content.