[resolved] Customize Comment Box position (7 posts)

  1. Thort
    Posted 9 years ago #

    Hi !

    When clicking on the link at the end of the post the comment box appear. The problem is, when clicking the comment box link, the site jumps up to the beginning of the post. Then, one have to scroll all the way down to the comment box. Very annoying!

    Is it possible to have the site stay at the position of the link after clicking the link, and display the comment box immediately on the screen whithout having to scroll down to it?

    My site:

  2. citeewurkor
    Posted 9 years ago #

    this should help you

    If there are no comments on a particular article the comments link has "#respond" on it, which isn't included in a lot of customized themes.
    I noticed this earlier and you need to add a bookmark into your theme somewhere:
    <a name="respond">
    I put it into my comments.php template just above the comments form.

  3. Thort
    Posted 9 years ago #

    Thanks for you fast reply citeewurkor!

    As you suggest I have put <a name="respond"></a> at the beginning of my comments.php template. Note, you forgot </a>. I had to add </a> to make the site validate properly.

    And it works! Now, the site doesn't jump back to the beginning of the post when clicking on the comments link. The comment box appear immediately on the screen. Just as I want it to do.

    Very Good. Thanks! :)

  4. citeewurkor
    Posted 9 years ago #

    What did I forget?
    looks like it got garbled.

  5. Thort
    Posted 9 years ago #

    Sorry !

    I forgot to put backticks around the tag. This is the first time I write tags in a post in this forum. Now, I have edited my reply above.

  6. citeewurkor
    Posted 9 years ago #

    oh, the closing tag.
    Yeah. It works with most browsers without it. But for validation,you're correct.
    I suspect you could self close it, too. like this

    <a name="respond" />

  7. Thort
    Posted 9 years ago #

    <a name="respond" /> also validates okey.


Topic Closed

This topic has been closed to new replies.

About this Topic