3

I couldn't think of a good title, sorry!

I have a website, with a floating (fixed) navigation/header bar. This works fine, however there are several anchors on the page, which allow for quick navigation and/or direct permalinking.

The issue arises when someone attempts to use one of these anchor links - the page jumps to the anchor, but the header is covering the content underneath the anchor. The browser jumps so that the top of the page view is at the anchor, but the top of the page view isn't the top of the page - the bottom of the navigation is.

So, how can I fix this?

Liam W
  • 1,193
  • 1
  • 26
  • 46

1 Answers1

0

You can place your anchor a little bit higher up the page so your navbar is shown

OR

You can use javascript to calculate the offset of the anchor from the top and add a few pixels to it, and have clicking the link scroll to that new offset.

kei
  • 20,157
  • 2
  • 35
  • 62
  • The issue is, there doesn't actually appear to be a named anchor - it appears to be dynamically inserted using Javascript. I'm using xenForo. – Liam W Nov 17 '13 at 22:38