943,891 Members | Top Members by Rank

Ad:
Sep 25th, 2007
0

Anchor tag and layers???

Expand Post »
Hi,

I haven't had the need to use an anchor tag like <a href="wahtever.html#here">blah blah</a> and <a name="#here"></a> in years. Now that I do, I'm using it on a page with layers too. I noticed that if I name the layer the same as the anchor (like <div id="here"), a link from another page will jump to that layer location. But...

Is this reliable? Does it work in all major browsers? Is this valid code or a fluke thing?

Thanks.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
Syakoban is offline Offline
46 posts
since Jan 2006
Sep 25th, 2007
0

Re: Anchor tag and layers???

Download A-Prompt Program Version 1.0
here
Last edited by macneato; Sep 25th, 2007 at 9:07 am. Reason: typos
Reputation Points: 46
Solved Threads: 48
Posting Pro in Training
macneato is offline Offline
414 posts
since Jun 2007
Sep 25th, 2007
0

Re: Anchor tag and layers???

Try looking up Anchor and Target

By using the ID attribute, you have basically made a "jump to link"....

usually, in the anchor, you'd have to have something like... href="blah.html/#thisonegere"... and in the page markup have an id for "thisonehere".
The link is jumping to that point!
Reputation Points: 63
Solved Threads: 12
Posting Pro in Training
autocrat is offline Offline
427 posts
since Feb 2005
Sep 25th, 2007
0

Re: Anchor tag and layers???

Click to Expand / Collapse  Quote originally posted by autocrat ...
you have basically made a "jump to link"....
What is the real difference? Will the "jump to link" work in the major browsers?

Thanks.
Reputation Points: 10
Solved Threads: 0
Light Poster
Syakoban is offline Offline
46 posts
since Jan 2006
Sep 26th, 2007
0

Re: Anchor tag and layers???

arg... go look it up

It should work i most modern browsers and the majority of text-readers.
go download some other browsers and test it

It's not new, nor is it phenominal... it's the same as the "Back to top" stuff on a lot of sites...
Look it up, read the usage andresults, then decide if you want to use it.

In my opinion... if you link to a page, it should start at the top.
If you link to an item on the page, you should go to that item (the jump link)... possibly with an option to go to the main page without jumping to the item.

But it boils down to choice.
Reputation Points: 63
Solved Threads: 12
Posting Pro in Training
autocrat is offline Offline
427 posts
since Feb 2005
Sep 29th, 2007
0

Re: Anchor tag and layers???

They are talking about deprecating the name attribute in anchor tags.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
Sep 29th, 2007
0

Re: Anchor tag and layers???

Then what will replace it?
Reputation Points: 10
Solved Threads: 0
Light Poster
Syakoban is offline Offline
46 posts
since Jan 2006
Oct 7th, 2007
0

Re: Anchor tag and layers???

I don't know.

They never came up with a good replacement for the center tag, or starting an ordered list at a number other than 1. The elitists making the decisions don't consider the fact that some people have uses for html other than books and newspapers.

Some possibilities include the id attribute, and a relative version of the href attribute.
Last edited by MidiMagic; Oct 7th, 2007 at 3:52 am.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
May 28th, 2009
0

Re: Anchor tag and layers???

Click to Expand / Collapse  Quote originally posted by Syakoban ...
Hi,

I haven't had the need to use an anchor tag like <a href="wahtever.html#here">blah blah</a> and <a name="#here"></a> in years. Now that I do, I'm using it on a page with layers too. I noticed that if I name the layer the same as the anchor (like <div id="here"), a link from another page will jump to that layer location. But...

Is this reliable? Does it work in all major browsers? Is this valid code or a fluke thing?

Thanks.


Thank You!!!!!
Lun
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Lun is offline Offline
14 posts
since Mar 2006
May 28th, 2009
0

Re: Anchor tag and layers???

The id attribute is replacing the name attribute.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: Page looks different in Firefox for Mac than Firefox for Windows
Next Thread in HTML and CSS Forum Timeline: no spaces between links





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC