Jump to content

Link Within Document causing top of the page to disappear


laffarsmith

Recommended Posts

Ok, I've spent a good part of the day trying to figure out what is going wrong with a client site. I introduced a link within document to send readers from the blogs home page to the comments section of individual posts. It's straight forward right? HTML1, been doing these kind of links for more than ten years.

 

#respond at the end of the normal URL in a normal anchor tag should bring the browser to id="respond" or name="respond" within the document. Right? But, a.) it doesn't. And b.) once it makes a jump everything above that point disappears. Space fills out to the same page height as if it existed but you can't scroll up.

 

You can see it in action at http://www.thebouncingbead.com/blog/ by clicking "Add Your Comment (0)" under the title of any post.

 

Can anyone see what might be causing this problem or experienced something similar before?

 

Link to comment
Share on other sites

I might be wrong, but #anchor_name only works if you use "filename.extension#anchor_name" (like in "page.html#myanchorname").

 

Sorry, I think I just said rubbish.

 

I checked your code, and the line where #respond is supposed to anchor might need to be changed.

 

You have "<a name="add_response"></a>" in your code, so:

 

1) Change the value "add_response" for "respond"

2) Move the whole "<a name="respond"></a>" inside "<h3 id="respond">Leave a Reply</h3>"

3) Eliminate "id="respond"" from <h3 id="respond">

 

The result should look like this:

 

<h3><a name="respond">Leave a Reply</a></h3>

 

Hope it helps.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.