Skip to content

Instantly share code, notes, and snippets.

@rfmeier
Last active August 29, 2015 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rfmeier/0e586532461e1ca35242 to your computer and use it in GitHub Desktop.
Save rfmeier/0e586532461e1ca35242 to your computer and use it in GitHub Desktop.
Make the navigation bar stick at the top in Cafe Pro theme.
/* Genesis Cafe Pro child theme style.css */
/* Make sure css changes are withing the max-width: 800px media query */
@media only screen and (max-width: 800px) {
/* line ~1965 */
.nav-primary,
.nav-primary.fixed {
/* set the position to fixed */
position: fixed;
/* make the menu stick at the top */
top: 0;
}
/* Optional. Set top to 32px if admin bar is present */
body.admin-bar .nav-primary,
body.admin-bar .nav-primary.fixed {
top: 32px;
}
/* Optional. Add padding to top top for widget area */
body{
padding-top: 44px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment