Krewe Posted January 11, 2012 Share Posted January 11, 2012 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 . ~Krewe Link to comment Share on other sites More sharing options...
Don E Posted January 11, 2012 Share Posted January 11, 2012 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 More sharing options...
TheGallery Posted January 11, 2012 Share Posted January 11, 2012 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 More sharing options...
Krewe Posted January 11, 2012 Author Share Posted January 11, 2012 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 More sharing options...
Don E Posted January 12, 2012 Share Posted January 12, 2012 It should if you have something like this on the page(link.php) it's suppose to go to: <a name="comments">Comments</a> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.