Created
December 12, 2019 19:05
-
-
Save stefany-newman/4dc8c4d42c66821845fdaf8a37b3841c to your computer and use it in GitHub Desktop.
Skip link (Bypass blocks) code
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
<style> | |
.skip a{ | |
position:absolute; | |
left:10000px; | |
top:auto; | |
width:1px; | |
height:1px; | |
overflow:hidden; | |
font-size:2em; | |
background:white; | |
font-weight: bold; | |
display:block; | |
padding:10px; | |
} | |
.skip a:focus{ | |
position:static; | |
width:auto; | |
height:auto; | |
} | |
</style> | |
<div class="skip"><a href="#content">Skip to Main Content</a></div> | |
<main id="content"> | |
// main content | |
</main> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you so much Michael! Feel free to ask any questions you might have :)