Skip navigation
Currently Being Moderated

center my iframe...

Apr 23, 2012 11:31 AM

the css...

#mymediaiFrame {

    margin: 0 auto;

    width: 800px;

    }

 

html...

<div id="mymediaiFrame"><iframe src="#" width="800" height="500" scrolling="no" frameborder="0"></></iframe></div>

 

In design view it appears to be centered, but in browser it is not 100% centered. Can you advise as to what I should alter? I may be going about this wrong.

 

Thanks!

 
Replies
  • Sudarshan Thiagarajan
    4,000 posts
    Oct 15, 2010
    Currently Being Moderated
    Apr 23, 2012 12:04 PM   in reply to r_tist

    You could try this:

     

    <div id="mymediaiFrame" align="center">

     

    Or, this:

     

    #mymediaiFrame {

    margin: 0 auto;

    width: 800px;

    text-align: center;

    }

     

    If neither work, post a link to your site/ page here.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points