Skip to content

Instantly share code, notes, and snippets.

@sergixnet
Created January 5, 2019 09:40
Show Gist options
  • Save sergixnet/cb933b26837b1cfc27253d99dff60392 to your computer and use it in GitHub Desktop.
Save sergixnet/cb933b26837b1cfc27253d99dff60392 to your computer and use it in GitHub Desktop.
How to offset anchor tag link using CSS
:target:before {
content:"";
display:block;
height:90px; /* fixed header height*/
margin:-90px 0 0; /* negative fixed header height */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment