...

View Full Version : link to a certain point in a page



steviecee
07-14-2005, 01:12 PM
Hi, how do you write a link to point to a specific point in another page, ie half way down a page, i've seen it down numerous times, but I can't find any tutorials out there to explain how its done, any ideas?
cheers
steve

mentalhorse
07-14-2005, 02:42 PM
at the text you want the link to go to add a:
<a id="nameyouwant">
then at the link do one of these:
<a href="#nameyouwant">
and there you have it

trancedm
07-14-2005, 02:42 PM
you could use css id selector to "group" the content you would like the link to be pointed to, then you could use that id value on your url, example below

index.html


<html>
<head>
<title>Blah</title>
</head>
<body>
<p><a href="test.html#blah">Click here</a></p>
</div>
</body>


test.html


<html>
<head>
<title>Blah</title>
</head>
<body>
<div id="test">
<p><a href="index.html">Click here</a></p>
<div>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<div id="blah">
<p>Hello</p>
</div>
</body>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum