click link brings you down lower in page?  | |
March 21st, 2002, 01:31 AM
|
#1 (permalink)
| | Banned
Join Date: Feb 2002
Posts: 804
| click link brings you down lower in page?
how do you make those things where if you click it, it brings you to the same page but lower down? the best example i can give is http://www.apache.org/dist/httpd/bin...win32/#winsock
if you click on one of the links at the top it brings you to a certain point on the page.... how? (i would normaly read the source but i have a cold and i gotta wear 2 sets of sunglasses just to prevent my eyes from watering) |
| |
March 21st, 2002, 01:36 AM
|
#2 (permalink)
| | Not Really a Member
Join Date: Oct 2001
Posts: 25,398
|
look up html anchors
notice the #<--- pound sign in the URL
__________________
Helicopters don't fly; they vibrate so much and make so much noise that the earth rejects them.
|
| |
March 21st, 2002, 01:44 AM
|
#3 (permalink)
| | Real gangstas sip on Yacc
Join Date: Oct 2001 Location: Suckas-ville
Posts: 4,552
|
<a name = "location">hehe take me here </a>
<a href="#location>Click me to go there!</a>
If memory serves me right that should work
Jkrohn
__________________
Signatures blow hard
If your signature contains an ad of any kind, congratulations, you're on my ignore list.
|
| |
March 21st, 2002, 01:48 AM
|
#4 (permalink)
| | Banned
Join Date: Feb 2002
Posts: 804
|
what do you mean by location? |
| |
March 21st, 2002, 03:00 AM
|
#5 (permalink)
| | Not Really a Member
Join Date: Oct 2001
Posts: 25,398
|
whatever text you want, its just aname
its a label for the anchor |
| |
March 21st, 2002, 03:10 AM
|
#6 (permalink)
| | Banned
Join Date: Feb 2002
Posts: 804
|
i don't understand how you set where it goes to though......... |
| |
March 21st, 2002, 04:06 AM
|
#7 (permalink)
| | Ultimate Member
Join Date: Oct 2001 Location: Sweden
Posts: 1,748
|
The
<a name=gohere>
tag sets the spot where the
<a href=#gohere>Go Here</a>
link points to.
Get it? |
| |
March 21st, 2002, 02:41 PM
|
#8 (permalink)
| | Member
Join Date: Nov 2001 Location: Bloomington IN
Posts: 219
|
What you are trying to do is an Internal Named Anchor Link.
This is a two step process:
1) Name the anchor
<a name="anchor"></a>
2) Create a text or image link
<a href="#anchor">Click here to move to point X</a>
When you click on the Link, it will drag the page contents up until the browser 'sees' the Named Anchor, and pull it to the top of the browser screen.
You can extend this concept beyond an internal page link as well.
Let's say you want to link from page1.html to page2.html#anchor:
On page1.html, you create the link:
<a href="page2.html#anchor">Click to move to Page 2, section X</a>
Then, in the code on page2.html, you would name the anchor
<a name="anchor"></a>
From your previous posts, your confusion seems to lie in targeting the destination. You simply use the <a name="xxx"> to create the 'anchor' above the text you want the browser to move to. And, you can 'name' it anything you want, just make sure the the anchor name and the link name are equivalent.
Make sense?
Last edited by tenor_david : March 21st, 2002 at 03:15 PM.
|
| |
March 21st, 2002, 06:40 PM
|
#9 (permalink)
| | Banned
Join Date: Feb 2002
Posts: 804
|
so i would have my site and there is a heading "BANNED GUYS" in the middle of the page... it would look like this? Code: <a href="#banned">click here to see banned guys</a>
<a name="banned">Banned Guys></a> ?
Last edited by Chooco : March 21st, 2002 at 06:48 PM.
|
| |
March 21st, 2002, 07:16 PM
|
#10 (permalink)
| | Member
Join Date: Nov 2001 Location: Bloomington IN
Posts: 219
|
Yeah, and anywhere you inserted the code:
<a href="#banned">click here to see banned guys</a>
you would click on the text, and the browser would pull the text banned guys to the top of the screen. |
| | | Thread Tools | Search this Thread | | | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |