Is it possible to scroll a document that is contained within an iframe, from outside of that iframe?!

Short answer... No!

As an additional test of styles (IE6 vs FF) - the IFRAME that follows has the following styles set. Works as expected in FF, not in IE6

/*overflow:hidden;*/	/* Doesn't work in IE6 */
overflow-x:hidden;	/* Ignored by IE6 */
overflow-y:scroll;	/* Strange bug in IE6, extra right margin */

The contents of the above IFRAME should be copied into the DIV below, by a call in the window.onload event of the actual document within the IFRAME.

Contents of IFRAME should be copied here...

Is it possible to grab the contents of an IFRAME ...?

[Output all properties of this IFRAME]

Output goes here...

Centering an IFRAME

To centre the contents of an IFRAME, you obviously have to centre the document that is contained within that IFRAME. To centre the IFRAME itself... surround the IFRAME in a DIV and set text-align:center; on that DIV! Works in FF, IE6 and Opera 8. This does, however, go against the grain, since I would have thought FF would have accepted margin:0 auto; but the does nothing!

Setting align="center" on the IFRAME itself, only centres it in IE6, not FF or Opera8.

[Home]