Linking to specific text...

liunx

Guest
Hi I'm hoping that you can help me. I have an index page with several listed questions that I wish to link to the three pages that contain the information. I want it so that when they click on a question it takes them not only to the right page (which I know how to do) but to the right section on that page, so that they don't have to scroll down till they find the relevant heading.<br />
<br />
Thanks! :)<!--content-->For each section on the page you want to target, give it an id (either in the <p> tag preceeding it, or in an <a> tag) like one of these:<br />
<br />
<p id="sectionname"><br />
<a id="sectionname"></a><br />
<br />
Then you can link to it using this code:<br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"page.html#sectionname">Go to section</a><br />
<br />
When this link is clicked, the browser will load page.html and scroll to the tag with the id sectionname.<br />
<br />
Adam<!--content-->Excellent, thank you very much for such a speedy reply.<br />
I'm going to alter it now. Thank you. :)<!--content-->
 
Back
Top