Keep iFrame positioned inside centered <div>?

Discussion in 'HTML and CSS' started by welshbaloney, Jan 12, 2008.

  1. welshbaloney

    welshbaloney

    Joined:
    Jan 12, 2008
    Messages:
    1
    Hello,
    I have a simple page that consists of an image, some map hotspots, and an iframe that displays content when the hotspots are clicked:

    <div id="wrapper">
    <img src="blah.gif" />
    ...
    some <area...target="iFrame"> tags
    ...
    <iframe id="iFrame" src="home.htm">No iframe support!</iframe>
    </div>

    With the wrapper naturally aligning to the top/left of the browser window, the iFrame is aligned correctly in relation to this.

    However, I want to center the image on the web page. When I align="center" the wrapper div, the iFrame stays where it is - misaligned.

    When the browser page is adjusted and the wrapper div centers in the new browser window, how can I ensure that the iFrame position adjusts to maintain its position relative to the wrapper?

    Thanks
     
    welshbaloney, Jan 12, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Daedalous
    Replies:
    3
    Views:
    825
    Daedalous
    Jan 16, 2004
  2. Nathan Carr
    Replies:
    0
    Views:
    295
    Nathan Carr
    Sep 17, 2004
  3. Dwayne Madsen

    Q: Div A inside Div B is larger than Div B

    Dwayne Madsen, Jun 1, 2005, in forum: Javascript
    Replies:
    1
    Views:
    239
    David Dorward
    Jun 1, 2005
  4. Joe Attardi
    Replies:
    0
    Views:
    561
    Joe Attardi
    Jan 17, 2006
  5. ryanveenstra@gmail.com
    Replies:
    0
    Views:
    135
    ryanveenstra@gmail.com
    Jun 2, 2006
Loading...

Share This Page