anchor links work in Chrome and IE8 but not firefox....
It works perfectly fine in Chrome and IE8 but not in firefox.
There are two anchors on the page and 2 links.
Link 1 for anchor 1 and link 2 for anchor 2.
Here is the code:
For anchor 1 it is:
Code:
<a name ="page" id="page"></a>
<a href="#page">Back To Page Top</a>
and for anchor 2 it is:
Code:
<a name="audio" id="audio"></a>
<a href="#audio">Back To Audio Top</a>
In Firefox link 1 leads to anchor 1. But link 2 also leads to anchor 1.
So the problem is that link 2 leads to anchor 1, when it should be going to anchor 2. Can anyone help here?
Please note that Im an amateur web developer
Thanks in advance
Do you have this up on the web somewhere? Have you run it through a validator? Most cross-browser mess ups can fixed with validation.
I think you will find that Firefox wants the A element to contain a text node.
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
yes ive run it through a validator..that isnt the problem
this is the most basic thing and firefox wants to mess people about with its silly procedures!!
can someone help here? what is a text node?
Literally that, text. A space, a letter etc.
Better would be to put the id on the containing div, or table, or however you've laid out your page.
Great wit and madness are near allied, and fine a line their bounds divide.
plain text, or you could use an inline element
At least 98% of internet users' DNA is identical to that of chimpanzees
this is painful.
Ive tried using the div ID tags as the anchors. This works in Firefox and Chrome but not IE8!!!
In IE8, the link simply doesn't work.
So link 1 leads to anchor 1
link 2 is simply dead
anchor 1 is going to the top of the page (associated with div id), and link 2 is associated with div id in the middle of the page
any other ideas here?
Second point: I still don't understand what you mean by a text node. If you could just give an example of what one looks like, it will make sense.
Thanks in advance
Last edited by mindonedig; 07-15-2010 at 02:40 PM .
The ID in the DIVs should work. Please post a link.
No text node:
Text node:
Code:
<a name="foo">Foo</a>
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
Are you in quirks mode? Use a doctype . Though I think it works either way.
Great wit and madness are near allied, and fine a line their bounds divide.
ALLELUIA praise the lord almighty!!! it worked!!!!
adding the text nodes made all the difference...it now works on firefox, chrome and IE8!!!
thank you very much everyone for all your help!!! it made all the difference to a total amateur like me!!!
YES!!
Also, make sure you leave no white space like in this link:
Code:
<a name ="page" id="page"></a>
"
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks