OriginalSunny Posted April 16, 2006 Share Posted April 16, 2006 Hi,I have been looking on a number of websites and seen that in their FAQ sections they have links to the answers to their questions. The thing is how do they create the link so it goes to the answer on a certain part of the same page?? The only thing i know is to create a link to another page not at a different part of the same page. If you know how to do this please let me know as i am creating an FAQ section for my website.Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/7554-faqs-on-many-websites/ Share on other sites More sharing options...
wildteen88 Posted April 16, 2006 Share Posted April 16, 2006 This is not PHP but more towards HTML if I am reading your post correctly. You usually see this type of thing on long pages that scoll quite far down the page. Such as a link that says Go to TOP at the bottom of a page. Then you'll place at the top of your page (just before the body tag).[code]<a name="top"></a>[/code]The code below is the linked that'll be a placed at the bottom of the page.[code]<a href="#top">Go to Top of page</a>[/code]If you have long page where you have to scrol then you click the Goto top of page link and it'l autotmatically go to the top of the page. This is the same affect that FAQ's use.Heres an example:[code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <title></title></head><body><a name="top"></a><a href="#bottom">Go to bottom</a><h1 style="margin-bottom: 2000px;">Top of Page</h1><a name="bottom"></a><a href="#top">Top of Page</a></body></html>[/code]If you click the link [i]Go to bottom[/i] it'll go to the bottom of the. Same applies to the [i]Go to Top[/i] link at the bottom but it goes to the top. Quote Link to comment https://forums.phpfreaks.com/topic/7554-faqs-on-many-websites/#findComment-27521 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.