Click to See Complete Forum and Search --> : iFrame Content Position


Cory R
06-09-2008, 01:22 AM
By default, content in an iFrame is positioned top-left. Is there a way to position the content in an iFrame how you want it? Say top-center instead of top-left, for example.

gil davis
06-09-2008, 09:46 AM
An iframe is like a window. You can style where the iframe is in relation to the containing window/document. The position of the iframe content is controlled by the document that is loaded into the iframe.

If the page in the iframe is yours, add a style to the body to center it.

If the page in the iframe is not yours, you won;t be able to do anything to it due to browser security features. Sorry. :(