Pages sometimes scrolling slightly in WordPress?

Soldato
Joined
26 Aug 2006
Posts
9,726
Location
62.156684,-49.781113
When I go to my homepage (http://gumbald.co.uk), the scrollbar is as far up as it will go, that's fine. Clicking on a blog post from the index keeps this, which is fine. The problem comes when clicking to get to another post from here, such as one of the ones in the "recent comments" widget. From then onwards, any clicks leave the page scrolled down slightly, just to above where the writing in the header is.

Not a major problem, but a little annoying: anybody point out where I'm going wrong? :)

Clicking the link to the homepage via the title resets it though! Argh!
 
That's standard behaviour as the comments widget is using a fragment identifier e.g. #comment-162 in http://gumbald.co.uk/2008/05/tree-cam-crisps/#comment-162

This means the browser will automatically jump down to comment-162 (well, the element with an ID of #comment-162 actually) when you click the link - useful to most when you have a long list of many comments.

As you don't have many comments and/or not enough content for the page to be long enough, the browser scrolls down as far as it possibly can. If you reduce the height of your browser window a lot i.e. so the window is about 100px high, and then click the link, you should be able to see what is happening.
 
Riiiight. I presumed clicking on the name would take you to the post, didn't think about it taking you straight to the comments. Cheers! :)

I do now feel quite silly for not thinking of that...
 
Last edited:
Back
Top Bottom