Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save svenporto/8f9cca625e27b4ad986a1808498cf1dd to your computer and use it in GitHub Desktop.
Save svenporto/8f9cca625e27b4ad986a1808498cf1dd to your computer and use it in GitHub Desktop.
Skip link on pragmaticaccess.com
== HTML
<a class="skip-main" href="#main">Skip to main content</a>
== CSS
a.skip-main {
left: -999px;
position: absolute;
top: auto;
width: 1px;
height: 1px;
overflow: hidden;
z-index: -999;
}
a.skip-main:focus, a.skip-main:active {
color: #fff;
background-color: #0F4F98;
left: auto;
top: auto;
width: auto;
height: auto;
overflow: auto;
margin: 15px 10px;
padding: 5px 15px;
border-radius: 5px;
font-weight: 700;
z-index: 999;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment