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

Fix anchor scrolling that hides behind top nav bar #46

Merged
merged 1 commit into from
May 29, 2017
Merged

Fix anchor scrolling that hides behind top nav bar #46

merged 1 commit into from
May 29, 2017

Conversation

lfalin
Copy link
Contributor

@lfalin lfalin commented May 28, 2017

Currently, when you use an anchor link, such as from the TOC box, or returning from a footnote, the actual anchor gets pushed behind the breadcrumbs/top-bar.

This change fixes that using some jquery and the code from https://stackoverflow.com/a/13067009/28106.

This could technically be fixed with pure CSS (https://stackoverflow.com/a/13184714/28106), but it would require adding a class to every tag that used anchors.

@matcornic
Copy link
Owner

Another thanks for this one :)

@matcornic matcornic merged commit aacdba8 into matcornic:master May 29, 2017
@lfalin lfalin deleted the anchor-fix branch May 29, 2017 18:13
@matcornic matcornic mentioned this pull request Jun 8, 2017
dcrankshaw pushed a commit to dcrankshaw/hugo-theme-learn that referenced this pull request Sep 13, 2017
gr1m0h pushed a commit to gr1m0h/hugo-theme-learn that referenced this pull request Mar 7, 2021
Fix anchor scrolling that hides behind top nav bar
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

Successfully merging this pull request may close these issues.

2 participants