I have just started designing a site and I a trying to create a link that automatically scolls to a certain point on the page?
Ex. http://websitetips.com/articles/
Thanks for your help.
| SitePoint Sponsor |
I have just started designing a site and I a trying to create a link that automatically scolls to a certain point on the page?
Ex. http://websitetips.com/articles/
Thanks for your help.


You mean something like this?
You'll have to create an anchor point for the part of the page you want the link to go to, then link to the part of the page, like so:Code:<a href="http://www.somewhere.com" onmouseover="location.href='http://www.somewhere.com'">link text</a>
Code:<a href="http://www.somewhere.com/index.html#content" onmouseover="location.href='http://www.somewhere.com/index.html#content'">link text</a>
Save the Internet - Use Opera | May my mother rest in peace: 1943-2009
Dan Schulz - Design Team Advisor | Follow me on Twitter
SitePoint References: HTML CSS JavaScript | Become A Guru
WordPress SEO Checklist | What WordPress Plugins Do You Use?
Web Standards Curriculum | Image Free Equal Height Columns

Or maybe like:That goes where you want the link to go when clicked and then the link would be:Code:<a id="anchorname"></a>Code:<a href="page.html#anchorname" title="#">Link Text</a>


I thought about that as well, Ben, but figured that a dash of JavaScript would be better in this case, since he wanted it to happen "automatically".
Save the Internet - Use Opera | May my mother rest in peace: 1943-2009
Dan Schulz - Design Team Advisor | Follow me on Twitter
SitePoint References: HTML CSS JavaScript | Become A Guru
WordPress SEO Checklist | What WordPress Plugins Do You Use?
Web Standards Curriculum | Image Free Equal Height Columns
Thanks alot, I have been looking all over for some scripts but could never find any. Thanks Again
Last edited by Joebs2004; Feb 10, 2007 at 00:46.
Bookmarks