Welcome to WebmasterWorld Guest from

Forum Moderators: brotherhood of lan & 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)

5+ Year Member

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)

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

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.

Featured Threads

Hot Threads This Week

Hot Threads This Month