Created
March 29, 2016 22:44
-
-
Save robinbastien/4906e52c0f0810a792870a0c73fdb426 to your computer and use it in GitHub Desktop.
A fix for linking to sections with anchors while having a 'sticky' header
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
.someselector[id]::before { | |
display: block; | |
content: ""; | |
width: 1px; | |
visibility: hidden; | |
pointer-events: none; | |
/* Set both heights to the same, adjust as needed */ | |
height: 11rem; | |
margin-top: -11rem; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment