Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When linking to sections from an external page, cuts off top of section. #35

Open
banbanbana opened this issue Mar 14, 2017 · 1 comment

Comments

@banbanbana
Copy link

banbanbana commented Mar 14, 2017

How can I adjust where the page scrolls to when linking from an external page?

Background
I have a one-page site that uses this nav, with TOS and Privacy Policy pages that are separate from the home page. I want a seamless experience, so included the nav on these external pages. However, if a user navigates to one of the sections, it cuts off the top 20-30px of the section. This does not occur when navigating to or between different sections from the home page.

What I've Done
I have already adjusted the headerHeight on line 127.
Right now I'm using a hacky workaround of adding 40 pixels to the line-height of the h1 in each section, which works ok for some sections, but not for the sections that don't have a h1 at the very top.

Other Helpful Info
Margins and padding are ignored when the script looks for the id, so I cannot use them for the above mentioned sections that don't start with an h1 such as the one pictured in the attached screenshot.

scroll-bug

@Ishpreet01
Copy link

@banbanbana Is this issue open? I would like to work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants