Skip to content

Instantly share code, notes, and snippets.

@amitmerchant1990
Last active December 28, 2018 00:32
Show Gist options
  • Star 23 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save amitmerchant1990/faff0fdf541a66093603bdee3d793daf to your computer and use it in GitHub Desktop.
Save amitmerchant1990/faff0fdf541a66093603bdee3d793daf to your computer and use it in GitHub Desktop.
GitHub Fixed Header for better accessibility.
/**
1. Install the Stylish(https://chrome.google.com/webstore/detail/stylish/fjnbnpbmkenffdnngjfgmeleoegfcffe?hl=en) extension for Chrome.
2. Open up extension options and paste the whole CSS mentioned below.
3. Specify the domain name to be `github.com`.
4. Add a title and save.
*/
.header {
padding-top: 10px;
padding-bottom: 10px;
background-color: #f5f5f5;
border-bottom: 1px solid #e5e5e5;
position: fixed;
top: 0;
width: 100%;
z-index: 99999;
}
div[role="main"] {
padding-top: 50px !important;
}
@amitmerchant1990
Copy link
Author

It will work like this:
github-fixed-top

@nicosantangelo
Copy link

Hey!

Do you mind if I add this as an option to my extension Github with a cape (on GitHub) with the proper acknowledgement ?

@awnumar
Copy link

awnumar commented Sep 16, 2016

What is this licenced under?

@altern8tif
Copy link

There's already a Stylish userstyle that implements this.

@amitmerchant1990
Copy link
Author

Yes. You can. @nicosantangelo

@hsbalar
Copy link

hsbalar commented Sep 19, 2016

Cool !

@alfredbez
Copy link

I removed background-color: #f5f5f5; since GitHub uses now a dark background and light icons and fonts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment