homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

iframed anchors in firefox - problem
iframed anchor firefox not working

Msg#: 4417614 posted 9:22 pm on Feb 14, 2012 (gmt 0)


I've the newest version of the following browsers:
Google Chrome
Internet Explorer

And only firefox refuses to go directly to anchor which is located in a website loaded in iframe. The link however without iframe works. How can I solve this problem ?

<a href="page1.html#anchor1" target="iframe1">Iframed anchor link</a>


<iframe name="iframe1" id="iframe1"></iframe>



<a name="anchor1">test</a>



WebmasterWorld Senior Member penders us a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

Msg#: 4417614 posted 8:23 am on Feb 15, 2012 (gmt 0)

Is page1.html the document inside the iframe?


Msg#: 4417614 posted 8:55 am on Feb 15, 2012 (gmt 0)

It is


Msg#: 4417614 posted 9:00 am on Feb 15, 2012 (gmt 0)

I've checked today again to see if it wasn't one-time thing, and I'm afraid its not.

The anchor itself (without iframe) wasn't working without a <!DOCTYPE>, after I've had added <!DOCTYPE> it started to working but still doesn't work in iframed window.

My focus now is to consider a following:
- iframe in table might cause a problem
- different doctypes
- anchors in table might not work


WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 4417614 posted 5:35 pm on Feb 15, 2012 (gmt 0)

You could try adding an id attribute to the anchor - <a name="anchor1" id="anchor1">test</a>


Msg#: 4417614 posted 5:43 pm on Feb 15, 2012 (gmt 0)

I found a problem, need solution now.

My iframe is very long and so no scrolling is required and firefox consider to transfer to an anchor only when there is scrolling-bar in iframe. It simply ignores the height =/

I'm not sure how to find solution for this problem yet.


Msg#: 4417614 posted 6:14 pm on Feb 16, 2012 (gmt 0)

Hi again,

I'm struggling with trying to find a solution for the problem.
Here is a source code of the problem:

2 seperate pages:

index.html and subpage.html

subpage.html is loaded into iframe which is located in a [u]index.html[/u].

subpage.html has anchors at different heights of the website.

link to anchors are located in [u]index.html[/u].

<a href="subpage.html#anchorTop" target="iframe1"></a>
<a href="subpage.html#anchorBottom" target="iframe1"></a>

<iframe height="1600"></iframe>


<a id="anchorTop" name="anchorTop"></a>
<a id="anchorBottom" name="anchorBottom"></a>
Part at the bottom of the iframe.
Part not visible in the window but is loaded into iframe

**Remove or ADD <br> to make sure the text is not visible but the scroll bar in iframe is not showed.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved