| View previous topic :: View next topic |
| Author |
Message |
cap
Joined: 15 Sep 2005 Posts: 6
|
Posted: Thu Sep 15, 2005 3:04 pm iframes - targeting multiple anchors in one document |
|
|
|
The site I am working on has a small iframe in the middle of the page which displays various documents/images. The links on the main page target the iframe and all work fine with the exception of one. The problem document is a long document with several named anchors. When the document is called up by the links it loads correctly but, the entire webpage "jumps" upward so that the top of the iframe is right up under the browser address bar and the top of the webpage disappears under the browser bar as though the whole page were scrolled upward. This only happens when viewing at resolutions of 1024x768 or less. Does anyone have any ideas how to fix this other than to cut up the document and make each section a smaller seperate document?
Code for main page:
<td><iframe name="window" id="window" src="edit/home.html" width="384" height="380" frameborder="0" scrolling="auto" marginwidth="1" marginheight="1">no frames text</iframe></td>
Code for image links:
<a href="edit/members.html#fch" target="window"><img src="images/logo_fch.jpg" width="80" height="66" border="0"></a>
Code to name section of doc to be displayed in iframe:
<a name="fch"></a>
<a name="whh"></a> etc
If you need to see it in action - http://www.spottediguana.com/AdHunts and the offending document is called up by any of the round logo icons along the bottom of the page.
Would appreciate any assistance on this prob - am going grey over this, and that color doesn't suit me |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8267 Location: Castle Rock CO USA
|
Posted: Thu Sep 15, 2005 5:50 pm |
|
|
|
I could not replicate that on IE 6.0. What browser are you using? It would be better / more compatible to use separate documents |
|
cap
Joined: 15 Sep 2005 Posts: 6
|
Posted: Thu Sep 15, 2005 6:58 pm iframes - targeting multiple anchors in one document |
|
|
|
I'm using IE6.0, however, the same thing happens in Firefox. Netscape handles it fine. The problem occurs only at resolutions of 1024 x 768 or lower and only with the document targeted by the round icons along the bottom of the page.
cap |
|
cap
Joined: 15 Sep 2005 Posts: 6
|
Posted: Thu Sep 15, 2005 6:58 pm iframes - targeting multiple anchors in one document |
|
|
|
I'm using IE6.0, however, the same thing happens in Firefox. Netscape handles it fine. The problem occurs only at resolutions of 1024 x 768 or lower and only with the document targeted by the round icons along the bottom of the page.
cap |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8267 Location: Castle Rock CO USA
|
Posted: Thu Sep 15, 2005 7:53 pm |
|
|
|
| You do not have that much actually wrong with your code. You do not have a DOCTYPE listed actually. I made my browser windows smaller and I still did not see the jumping or anything like that |
|
cap
Joined: 15 Sep 2005 Posts: 6
|
Posted: Wed Sep 21, 2005 1:14 pm |
|
|
|
I've replaced the DOCTYPE. Perhaps you did not make your window small enough to see the effect. If you drag the bottom edge of the browser up high enough that the reddish bar with the text links on it is covered and then click one of the round logo icons that should do it.
Thanks |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8267 Location: Castle Rock CO USA
|
Posted: Wed Sep 21, 2005 1:59 pm |
|
|
|
I see the problem but are you really worried about that - if someone is viewing your site in that manner?
The reason it is happening (if I remember correctly) is because of where the anchor is located in regard to the size of the window |
|
cap
Joined: 15 Sep 2005 Posts: 6
|
Posted: Wed Sep 21, 2005 4:04 pm |
|
|
|
What you did there was to simulate the view at a lower resolution. Anyone viewing the site at resolutions of 1024 x 768 or less will have this problem because at those resolutions the bottom of the page extends below the browser bar.
Wherever I place my <a name="the spot"></a> THAT spot on the page becomes the first line displayed at the top of the iframe.
Have tried <body valign="bottom"> and <div valign="bottom"> to try to hold the page in place.
cap |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8267 Location: Castle Rock CO USA
|
|
cap
Joined: 15 Sep 2005 Posts: 6
|
Posted: Wed Sep 21, 2005 5:53 pm |
|
|
|
Thanks. If I get an answer I'll be sure to post it here. I can't believe I'm the only one who has had this problem.
cap |
|
|