• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

link anchors

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm building a FAQ ie a load of questions followed by the answers. You click on the question and you get the answer.

I'm using html links for the questions and html anchors for the answer as both questions and answers are in the same page ie

<a href="#answer">question</a>

......

<a name="answer"/>answer</a>

This fairly standard, but the trouble is that the answers don't always position themselves to the top of the page.

Why is this and is their a solution to this? What is the proper design for a FAQ?

Can anyone help?

Thanks
 
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's nothing you can do to modify the browser's behavior with regards to positioning.

If you want to use a different mechanism, you could have the answer immediately follow the question in a non-displayed div, and only reveal the div when the question is clicked.
 
If you try to please everybody, your progress is limited by the noisiest fool. And this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic