If it's still a bit offkilter after that, just tweak the iFrame X and Y to fit again and it will work.
Because the image is centered it will change dynamically with a resolution change to stay in the center of the user's screen. The iFrame, on the other hand, is in a static position, therefore not moving along with the centered picture.\
Changing resolution size changes picture sizes, no?
No it does not. Changing resolutions changes the size of your screen. An image that is 100x100 at a higher resolution will still be 100x100 at a lower resolution. The difference is that your screen will display all pixels bigger. Think of it as drawing a box around part of your current res and expanding that - the only thing changing is your view. Well, that and things like aligning that are dynamic to the resolution.
Also, when putting an iframe over an image, it might be best to use tables.
Again, no. iFrames are made specifically so they can be seperated from the rest of the screen. Fact is, if he had made the image the background of a table, a little fancy cell work could've removed the need for an iFrame at all, plus made the page easier to update and cleaner from a coding point of view. Of course, this would've required him to split the background image into a few images, but that's the tradeoff for the benefits - more work, more rewards.
Another side benefit of tables: If you have one of those fancy gradient bars, and you want to reduce filesize as well as be able to put text, like a title, on top of it, you can set the bar to being one pixel wide and as tall as you want. Putting it as the background of a table would stretch it to make it look the same as a wide version, with an infinately smaller filesize.
Meh... I'm backed into a corner. I used sliced up photoshop images because I suck at mapping out a site manually, then throw an iframe where the content box is, switching the image to the background.
Whatever works for you I guess.
Is there a way to have it centred while still keeping the iframe in the content spot?
From what I know, I don't believe so. The only way would be to get the user's resolution(there's a simple way to get it through Javascript, I believe) and edit the X and Ys accordingly, but even that wouldn't be compatible with everything.
The only way I can think of is putting the entire page within another iFrame and then centering that, but I'm not sure if iFrames can be nested, or if it will work right if they can. It won't look that bad just because it's not centered.
Or you could use tables only, like I mentioned before.
Ok I fixed it. I just put the content on a popup so that it wouldn't matter if it was aligned to the left or centre.
Thanks for the help! :)