I-Frame: positioning error

  kalignorgna 13:25 PM 29 Jan 09
Locked

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.

  slightlymad 19:10 PM 29 Jan 09

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.

  kalignorgna 10:27 AM 30 Jan 09

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.

  Forum Editor 23:19 PM 30 Jan 09

huge slabs of HTML in the forum.

  kalignorgna 13:11 PM 02 Apr 09

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

  kalignorgna 14:50 PM 02 Apr 09

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 :(

Advertisement

This thread is now locked and can not be replied to.

How to get Windows 10 now: how to download and install Windows 10 even if GWX.exe is missing

1995-2015: How technology has changed the world in 20 years

Nokia rolls out spherical camera for virtual reality apps

OS X Yosemite vs Windows 10: The Mac and PC operating systems go head to head UPDATED