How do I make a link to a certain section of a web page? For example, I have a glossary page on my site. I would like to link a word on another page to its definition on the glossary page and for it to land at that particular section even if the definition may fall in the middle or end of a page. I have seen this done but have no idea how. Anyone know how this is done?
Thanks. I have made it work but it does not land on the particular section as accurately as I would like.
Try to add #id at the end of the link. #id - id of element on page you want to point to. So if you got a list of words on a glossary page it might look like this: <a href="http://www.yoursite.com/glossary.php#thisword">Link</a>.
That is pretty much what I did Nordvond, except for this php as this is an HTML document. It would get the page but never land on the section I wanted, usually just near the top of the page and when you scrolled down the target terms would be highlighted.
Wrap every searched element in div block, and link on that blocks. Works fine even in html, just checked.
If you had a <div> that we will call destination, then you could have the code as <div id="destination">This is your destination's text</div>. You could link to that destination ONLY WITHIN THAT PAGE by <a href="#destination">link</a>. Hope that helps
The section the target text is in actually is in DIV tags but the tags encompass a large section of the document. I think for the time being I am going to put this off as I really do not want to make any large layout changes at this time. Thanks for all your help guys.