This is a discussion on "link to specific location on page" within the Web Page Design section. This forum, and the thread "link to specific location on page are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
link to specific location on page
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
link to specific location on page
I have been using <a name="#"> to create links from a menu to different specific locations on a page.
I must be doing something wrong as each menu link goes to the same anchor point each time even though I've given them separate and specific names. It works on the first one just fine but then returns to the same point from all of the other links. By the way I would like it to be W3C validated too. Any tips? |
|
|
|
|||
|
Re: link to specific location on page
Can you paste your code on here, i am sure it will help people to give you better assistance
|
|
|||
|
Re: link to specific location on page
To create links to a link within the page, currently two HTML tags need to be used.
<A HREF="#top">Top</a> <A NAME="top"> The first tag <A HREF="#top">Top</a> is different in that it has a # which represents a name statement. When the user clicks on Top, the computer would then go to the name tag, if found. The second tag <A NAME="top"> is where the first tag will reference when clicked. |
|
||||
|
Re: link to specific location on page
Yeah, do Ryan's way it is the correct way to accomplish this.
|
|
||||
|
Re: link to specific location on page
I've never actually heard of using the name attibute before... You can use targets in HTML, but it's not valid XHTML.
|
|
|||
|
Re: link to specific location on page
Ryan's way works fine. Thanks!
Just one thing I'm using <div id="top"></div> where I want to point to and then <a href="#top">link</a> to point to it. Is that the correct way or is there a better way? It validates, but just want to be sure. Cheers Snappy |
|
||||
|
Re: link to specific location on page
That is the correct way snappy.
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
|||
|
Re: link to specific location on page
Yeah i did it on my old company site that i was working on and W3 said it was ok so you shoud be good.
RYAN's THA MAN!! |
|
||||
|
Re: link to specific location on page
OMFGoogle.. Rob's alive? And yes the anchor/div method is muy bueno.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
||||
|
Re: link to specific location on page
|
|
|||
|
Re: link to specific location on page
your gonna have to explain this to me guys......... hows ryans method different to mine?
|
|
||||
|
Re: link to specific location on page
They're different, but mine is correct. It's like using target="_blank" in XHTML. It works, but it's not correct.
|
|
|||
|
Re: link to specific location on page
Ryans way is correct and they best way in my mind but only time i used that was when i was at college and had to do a project with anchor lok for me pages
Thanx Aarom |
|
|||
|
Re: link to specific location on page
sorry i was drunk and i couldnt see the difference lol.... yeah ryans looks more appropriate in the light of sobriety
|
![]() |
| Tags |
| link, specific, location, page |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| internal navigation, Linking from one page to a specific div in another page. | Oak | Web Page Design | 5 | Feb 8th, 2008 22:54 |
| Can I set my page to be a specific size on every browser? | Inkers | Web Page Design | 9 | Jan 14th, 2007 11:03 |
| link to specific location on page | snappy | Web Page Design | 2 | Dec 5th, 2006 18:54 |
| link opens new window problem - still showing location | Micky-D | JavaScript Forum | 6 | Oct 27th, 2006 02:45 |
| Open a specific page dependent on what is entered into a criteria box??? | IanW | Web Page Design | 2 | Sep 15th, 2006 12:39 |