Click to See Complete Forum and Search --> : help with FAQ on my site....
jsl312006
08-04-2007, 02:32 AM
hello everyone. i am still pretty new to web site design and have a question for ya'll. i am wanting to put a FAQ page on my site and have it so that when you click the question it will move down the page to the answer. how do i do that or is there a template for it?
NogDog
08-04-2007, 02:48 AM
The simplest way is to assign a unique ID an element you want to jump to:
<h3 id="item_3">This Is Item Three</h3>
Then in the "contents" section at the top, create a link to that ID (using the "#" character in the link):
<li><a href="#item_3">Jump to Item Three</a></li>
jsl312006
08-04-2007, 03:52 AM
ok i see what you mean. now, that takes me to a new page correct? and if i want the answers on the same page, how do i go about doing that?
NogDog
08-04-2007, 06:03 AM
No, it does not take you to a new page. (It would only try to do that if there were something before the "#" in the href attribute of the <a> tag.) It will scroll the current page up/down to the element with the specified ID, if there is one.
jsl312006
08-04-2007, 03:43 PM
ok this is frustrating lol. i am trying to do it like you suggested but it is still trying to take me to a new page instead of down the page. here is a sample html that i used.
<LI><A href="http://beltonpaintandbody.com/#item_3">Where do i get my claim number?</A>
<H3 id=item_3> </H3>
<H3>From your insurance company</H3></LI>
i dont enter the "http://beltonpaintandbody, it adds it on its own. and whe i enter the " marks by id=item3, it removes them.......any ideas?
if you go here, http://beltonpaintandbody.com/page3.html and click one the first few questions, you will see what i mean.
jsl312006
08-04-2007, 05:21 PM
nevermind, i figured it out. thank you very much though.
Major Payne
08-05-2007, 01:40 AM
For others who would like more info on linking. Especially the "How to link to another part of the same web page" topic:
CSS HTML Tutorial.com (http://csshtmltutorial.com/csshtmltutorial-htmllinkcodetutorial.php)
Ron
Ferret
08-05-2007, 09:02 PM
I've always used <a name="id3"></a>
then to link to it: <a href="#id3">Click Me</a>
Does it matter whether you use name or id? Is one preferred? Name works, I just don't know if it's standard. :D
Major Payne
08-05-2007, 09:21 PM
I've always used <a name="id3"></a>
then to link to it: <a href="#id3">Click Me</a>
Does it matter whether you use name or id? Is one preferred? Name works, I just don't know if it's standard. :DThe Anchor Tag and the Name Attribute (http://www.w3schools.com/html/html_links.asp)
Ron
ray326
08-06-2007, 12:17 AM
The named anchor really needs to span some text. Anecdotal evidence indicates some browsers will not recognize empty named anchors.
NogDog
08-06-2007, 08:03 AM
If nothing else, I'm the sort who would rather use an ID attribute in an existing tag that presumably needs to be there anyway, rather than adding a separate tag with no purpose other than to be something to link to.