Skip to content

Instantly share code, notes, and snippets.

@akerbos
Last active September 18, 2017 21:20
Show Gist options
  • Save akerbos/8331073 to your computer and use it in GitHub Desktop.
Save akerbos/8331073 to your computer and use it in GitHub Desktop.
Changes the new Stack Exchange top bar so that it stays fixed even when scrolling.
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain('stackoverflow.com'),
domain('stackexchange.com'),
domain('superuser.com'),
domain('serverfault.com'),
domain('stackapps.com'),
domain('askubuntu.com'),
domain('mathoverflow.com'),
domain('answers.onstartups.com'),
domain('mathoverflow.net') {
header.top-bar {
position: fixed;
top : 0;
z-index: 1001; /* move in front of stuff */
width : 100% !important;
}
/* Moves the sidebar on "Ask question" so it does not become partially hidden. */
div#scroller {
transform: translateY(34px) !important;
}
div.ask-sidebar {
overflow : visible !important;
}
/* Moves the review bar so it does not become partially hidden. */
div.review-bar {
top: 34px !important;
}
/* Makes dismissable headers visible again. */
div#overlay-header {
z-index : 1002 !important;
}
}
@akerbos
Copy link
Author

akerbos commented Jan 9, 2014

Adapted from Rob W's version using another comment of his.

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