Reply
sections links
Old 02-26-2008, 03:19 PM sections links
Banned

Posts: 143
Name: Blake
Location: Cuyahoga falls,Ohio
what im trying to do is fine the code where u can have different links along the side of youre code to go to different sections of the site like if someone scrolls down to youre page and u want the visitor to go to the top of the page or the middle section of the page whats the code to do that ? can anyone direct me please!!
blktallos is offline
Reply With Quote
View Public Profile Visit blktallos's homepage!
 
When You Register, These Ads Go Away!
     
Old 02-26-2008, 03:59 PM Re: sections links
Gilligan's Avatar
Dead Like Me

Posts: 1,591
Name: Stefan
Location: London, UK
Anchors

very simple to do.

For the part you want to link to (the content), use this.

Code:
<a name="whatever">Content here</a>
Although you don't actually have to put any content in between the tags, it will still work.

For the link, you would basically link to the anchor, and would be page.html#whatever. But if its on the same page it would be.

Code:
<a href="#whatever">Whatever</a>
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 02-26-2008, 03:59 PM Re: sections links
Arenlor's Avatar
Ultra Talker

Posts: 463
Name: Jerod Lycett
Location: /home/arenlor
HTML Code:
<a name="top">The top of it page</a>
<a href="#top">Top</a>
Put the <a name="top"> at the top of the page, or wherever you wish the link to go in that page, then add <a href="#top"> as normal. You can use any name you want for them of course.
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
Arenlor is offline
Reply With Quote
View Public Profile Visit Arenlor's homepage!
 
Old 02-26-2008, 04:46 PM Re: sections links
Gilligan's Avatar
Dead Like Me

Posts: 1,591
Name: Stefan
Location: London, UK
Lol, beat you to it (by seconds)
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 02-26-2008, 05:39 PM Re: sections links
Banned

Posts: 143
Name: Blake
Location: Cuyahoga falls,Ohio
wait i dont get it so im using it for my blog http://www.blakeanthonydesign.com/blog.html

do i have to put some of the content in between
the tag?
<a href="#top">Like this would be the content do i have to put it all in between here ?</a>

and then i would


ahh im so confusedd =[
blktallos is offline
Reply With Quote
View Public Profile Visit blktallos's homepage!
 
Old 02-26-2008, 05:41 PM Re: sections links
Banned

Posts: 143
Name: Blake
Location: Cuyahoga falls,Ohio
waiiiiit i get it


okay my divs are labeled

id="layer4"

so all i have to do is

make a <a href="#layer4">Top of layer 4 </a>


and it makes my link to layer 4 <3

i figured it out :] by myself loolll thank you guys though
blktallos is offline
Reply With Quote
View Public Profile Visit blktallos's homepage!
 
Old 02-26-2008, 06:55 PM Re: sections links
LadynRed's Avatar
Super Moderator

Posts: 6,347
Location: Tennessee
Ok, it really isn't necessary to use that old <a name.............> coding. Simply use an ID on any element such as:

<h1 id="top">blah blah</h1>
It works just as well in ALL browsers and eliminates the need for all that anchor coding.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 02-26-2008, 09:48 PM Re: sections links
Arenlor's Avatar
Ultra Talker

Posts: 463
Name: Jerod Lycett
Location: /home/arenlor
What about in screen readers?
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
Arenlor is offline
Reply With Quote
View Public Profile Visit Arenlor's homepage!
 
Old 02-28-2008, 02:19 PM Re: sections links
LadynRed's Avatar
Super Moderator

Posts: 6,347
Location: Tennessee
Yes, it works with screen readers.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 02-28-2008, 03:30 PM Re: sections links
Arenlor's Avatar
Ultra Talker

Posts: 463
Name: Jerod Lycett
Location: /home/arenlor
I had not known this, it opens up a lot of easiness. Thanks!
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
Arenlor is offline
Reply With Quote
View Public Profile Visit Arenlor's homepage!
 
Reply     « Reply to sections links
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14756 seconds with 13 queries