Last active
March 4, 2016 18:31
-
-
Save gfcarvalho/1659a98eba3c8c846467 to your computer and use it in GitHub Desktop.
Scroll to offset anchor links. Change the numbers to fit the height of your heading. Include <a class="anchor-offset" id="your-anchor-name"></a> in your HTML file where you want to place the anchor.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.anchor-offset { | |
display: block; | |
margin-top: -100px; | |
padding-top: 100px; | |
width: 1px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://wordpress.org/support/topic/how-to-scroll-to-offset-anchor-links