Skip to content

Instantly share code, notes, and snippets.

@davechu
Last active August 29, 2015 13:57
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 davechu/9569696 to your computer and use it in GitHub Desktop.
Save davechu/9569696 to your computer and use it in GitHub Desktop.
.head-wrap {
position: fixed;
width: 100%;
z-index: 999;
min-height: 100px;
margin-bottom: 0;
}
.site-header, .header-image .site-title a {
min-height: 100px;
}
.header-image .site-header .widget-area {
padding: 27px 0;
}
.slider {
margin-top: 130px;
}
/** this trick removes the need to have the offset for the fixed header **/
body .site-container section.widget {
margin-top: -100px;
padding-top: 100px;
}
body.admin-bar .site-container section.widget {
/** compensate for fixed header when logged in and testing **/
margin-top: -132px;
padding-top: 132px;
}
.nav-header .menu-item a.active {
/** the optional current link color. adjust to taste. **/
color: #ffb600;
}
@media only screen and (max-width: 1023px) {
/** stop the fixed header at small sizes **/
.head-wrap {
position: static;
}
/** readjust for the non-fixed header **/
.slider {
margin-top: 20px;
}
body .site-container section.widget {
margin-top: -20px;
padding-top: 20px;
}
body.admin-bar .site-container section.widget {
margin-top: -20px;
padding-top: 20px;
}
.header-image .site-header .widget-area {
padding: 5px 0 0;
}
}
@media only screen and (max-width: 767px) {
/** help with menu spacing at very small sizes **/
.genesis-nav-menu a {
padding: 8px;
}
}
<script type="text/javascript">
jQuery(document).ready(function($) {
$('.nav-header .menu-item a').click(function() {
$('nav ul li a').removeClass("active");
$(this).addClass('active');
});
$('#esslgotop').click(function() {
$('nav ul li a').removeClass("active");
$('.nav-header .menu-item a:first').addClass('active');
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment