User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 425,952 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,618 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting

Keep iFrame positioned inside centered <div>?

Join Date: Jan 2008
Posts: 4
Reputation: welshbaloney is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
welshbaloney welshbaloney is offline Offline
Newbie Poster

Keep iFrame positioned inside centered <div>?

  #1  
Jan 12th, 2008
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
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 10:18 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC