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

Offset the content by the navigation bar height also for direct links #16

Open
KasparEtter opened this issue Nov 26, 2020 · 0 comments
Open

Comments

@KasparEtter
Copy link

When linking directly to a section of the spec like this, the title is covered by the navigation bar. There are two ways to offset the content correctly:

  • CSS: Use a positive padding with a negative margin on all headings.
  • JS: Recognize when the page is loaded with an anchor and call the scroll animation with this anchor.
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

1 participant