PDA

View Full Version : How to auto scroll to a specific point on a page?




p0intblank
Aug 11, 2009, 12:56 PM
I manage a site for a client of mine through Ning.com. They want me to enable a graphic that when clicked will auto jump the user to a specific point on the page (i.e. 75% down towards the footer) I know how to do this in Wordpress through adding a hash tag, but is this possible on Ning?

Thanks!



SilentPanda
Aug 11, 2009, 12:57 PM
It should be possible using an HTML anchor (http://www.w3schools.com/HTML/html_links.asp).

p0intblank
Aug 11, 2009, 01:11 PM
It should be possible using an HTML anchor (http://www.w3schools.com/HTML/html_links.asp).

I got it. I always seem to figure it out right after posting the thread... Anyway, thanks for the help!

ChicoWeb
Aug 11, 2009, 01:48 PM
Actually, you may want to think about using ID's. Not all browser like anchors. Something like...

<a href="file.html#foo">To point a</a>

<p><a name="foo" id="foo">Hi, I'm point A</a></p>

Mal
Aug 11, 2009, 01:58 PM
Actually, you may want to think about using ID's. Not all browser like anchors. Something like...

<a href="file.html#foo">To point a</a>

<p><a name="foo" id="foo">Hi, I'm point A</a></p>

What you posted is an anchor tag. Using the id attribute instead of the name attribute (or in addition, as you posted) is indeed a good recommendation, just wanted to point out that you are still indeed using an anchor (which is the proper way).

jW