Jump to content

Quick Nav Question


Krewe

Recommended Posts

How do you make a "jump to" navigation system.I am talking about one of the in page navigation that quickly moves your to a different position on that same page. I do not know what it is called so it is really hard to google... ha.Thanks for answering this noobie question :P. ~Krewe

Link to comment
Share on other sites

Say you have a link like this at the top of your page: <a href="#CSS">CSS Section</a> Then where ever on the same page the actual section is or where it begins, you add this: <a name="CSS">CSS</a> When clicking on the first link, it will take you down to the second link(the CSS Section). You can also use other elements, like H1 for example. But in HTML5 from what I understand, you have to use the id attribute instead of the name attribute. ie:<h1 id="CSS">CSS</h1> http://w3schools.com/html/html_links.asphttp://w3schools.com/html/tryit.asp?filename=tryhtml_link_locations

Link to comment
Share on other sites

Just like Don E mentioned, you use the <a> tag like in links, but instead of a link to a file, you link to IDs within the page.

Link to comment
Share on other sites

Awesome, now for a little more advance :PIf I have a link that uses ?id= to get info from a database would I just write it like this? <a href="link.php?id=1#comments"></a> I want someone to click the link so it takes them to that different page, and then moves them straight to the comments in this case.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...