Skip to content

Instantly share code, notes, and snippets.

@beta
Last active August 4, 2020 03:37
Show Gist options
  • Save beta/cb39c765ad3e34a368d94623701ab399 to your computer and use it in GitHub Desktop.
Save beta/cb39c765ad3e34a368d94623701ab399 to your computer and use it in GitHub Desktop.
Move GitHub repo header to page center, for better experience on wide screens
@media (min-width: 1280px) {
main#js-repo-pjax-container > div > div:first-child {
max-width: 1280px;
margin-left: auto;
margin-right: auto;
}
main#js-repo-pjax-container > div > nav > ul {
margin-left: calc((100vw - 1280px) / 2 - 8.5px);
}
main#js-repo-pjax-container > div > nav > div {
right: calc((100vw - 1280px) / 2 - 8.5px) !important;
}
}
@beta
Copy link
Author

beta commented Jul 1, 2020

Preview (up: before, down: after)
Preview

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