We use cookies to provide you with a better experience. If you continue to use this site, we'll assume you're happy with this. Alternatively, click here to find out how to manage these cookies

hide cookie message
Contact Forum Editor

Send an email to our Forum Editor:


PLEASE NOTE: Your name is used only to let the Forum Editor know who sent the message. Both your name and email address will not be used for any other purpose.

Tech Helproom


It's free to register, to post a question or to start / join a discussion


 

I-Frame: positioning error


kalignorgna

Likes # 0

I use an I Frame for a side news bar on the work Intranet. It is positioned on the right hand side over the top of a image with the position set to absolute; so when the page changes size it stays over the image. My problem is quite simple the I Frame appears on the right edge the image instead of in the centre, even tough I've placed it on top of the image in Dreamweaver. It worked fine up until 2 weeks ago when I made some changes and then each time I loaded it up in IE the I Frame moved a little more to the right.

I know this is a positioning error of some sort but the only thing I can think of to correct it is to delete and start again. I’m hoping that some one might know a way to fix this.

Like this post
slightlymad

Likes # 0

Using absolute positioning will position your I-Frame a set distance from the top of the screen and a set distance from the left. Note that the positioning is relative to the VIEWPORT, so depending what size monitor you're using, it will change relative to your image. What is positioned correctly on your screen may not be the same on another computer.

Still that doesn't explain why the I-Frame appeared to move when viewed on the same computer. I'm guessing that you have your Favorites pane open, and widening or narrowing this will have an impact on absolutely positioned elements.

Are you familiar with CSS? If so, I'm sure we can fix this but it would be helpful if we could see the style sheet.

Like this post
kalignorgna

Likes # 0

For reference I use 19 inch monitor set at 1440 x 900 but I have designed it so that when viewed on a smaller monitor the objects stay ruffley in the same position and yes I have Favourites pane open. I am familiar with CSS but have only started using it this past year so am still getting to grips with it

I will post the Style Sheet later today but I have to change the names and such for security.

Like this post
Forum Editor

Likes # 0

huge slabs of HTML in the forum.

Like this post
kalignorgna

Likes # 0

I'm sure it is the position:absolute settings i've tryed to make an over i frame but same problem and the file only cotains text. I have even resorted to buying a dreamweaver book to figure this out :(

<IFRAME src="external.htm" name="frame2" scrolling="no" id="frame2" style="position:absolute; left: 833px; top: 266px; width: 150px; height: 218px;">text/IFRAME>

when i make a new iframe script one of two things happen first typing it in from scrach all but the start and end tag apear as text and it don't work ??? second copy + paste has the same error as other iframe (as expected)
can some one tell me how to make the iframe script work

Like this post
kalignorgna

Likes # 0

now know why the script wasn't working when i typed it into dreamweaver auto script was puting a > at the end of the open script.

still no change with the placement of I frame in browsers though its still appearing right of where it should be loading :(

Like this post

Reply to this topic

This thread has been locked.



IDG UK Sites

OnePlus Two release date rumours: Something's happening on 22 July

IDG UK Sites

13in MacBook Air review, Apple's MacBook Air 2014 reviewed

IDG UK Sites

5 reasons to buy an electric car and 5 reasons not to

IDG UK Sites

Evernote Skitch: the best way for creatives to doodle feedback