Welcome to WebmasterWorld Guest from

Forum Moderators: keyplyr & mack

Message Too Old, No Replies

Center Contents of Iframes

How to Center the Content of an I Frame

4:53 am on Feb 23, 2010 (gmt 0)

New User

5+ Year Member

joined:Dec 18, 2009
posts: 20
votes: 0

Is this do-able with <iframe> ? Center content

I want to adjust (center) the source webpage in iframes.. Also knowing how to adjust up and down, if possible, would be nice. If no solution is availble, is there any other option? I was thinknig like using the object element be used instead of iframe tag for this

Anyone know this one?
7:41 pm on Feb 23, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
votes: 0

The iFrame is another page, you'd apply margin:auto to the content that goes in there. If you have no control over the content, I doubt there's much you can do. Cross-frame security policies prevent you from doing anything to an iFrame'ed page, unless it exists on the same domain.