Results 1 to 6 of 6
Position:absolute problem Forum: HTML ForumReplies: 0
Absolute best way to design navigation. Forum: Search Engine Optimization - SEO - ForumReplies: 0
Absolute best way to design navigation. Forum: HTML ForumReplies: 0
Uploading and absolute hrefs? Forum: General DiscussionReplies: 2
Setting an image to the absolute corner Forum: HTML ForumReplies: 7
12-01-2004, 05:28 AM #1
iFrame positioning? do they always have to be absolute?
I'm using iFrames to hold a menu system and content on my website... www.ardmore.co.uk
ATM it is positioned hard left. I would like to be able to position the page aligned middle to accomodate larger screen resolutions.
I have a 21" monitor and when the browser is maximised the site looks lonely all the way up in the top corner.
Is there anyway i can get my iFrames to hold their position in relation tho the other page elements, but get the site to align centrally when the browser page window is maximised???
12-01-2004, 10:23 AM #2
Have you tried
<div align="center"> ...ALL your content ... </div>
12-07-2004, 04:38 AM #3
yes i have tried this. I don't think iFrames behave as normal HTML content as they 'float' over other content and take their position, in pixel coordinates from the top left hand corner of the screen.
I what i mean is... is it posible to make iFrames move with a point or image on the page when the browser is resized. ie they float with that point or image relative to their original position on stretching the browser window?.
12-07-2004, 09:15 AM #4
This will happen if you use position: absolute. Have you tried position: relative? relative will not collapse the original space left by the iframe, and its position is always relative to where it would have been on the page naturally.
12-08-2004, 04:48 AM #5
No i havent tried it, but i would if i knew how too?
Have you any ideas? currently my frames are displayed as:
<iframe id="content" name="content" style="position:absolute; left:615px; top:67px; width:148px; height:293px; z-index:1" frameborder="no" scrolling="no" src="content/content_about-us.htm"> </iframe>
12-08-2004, 05:12 AM #6
If you change absolute to relative, then change your left and top values.
The difference is that absolute reads the top and left from either the highest containing element (ie the body) or the containing element that has a position declared itself. But with relative, the values are read from where the element would be naturally. Try just changing the absolute, you should see what I mean.