Skip to content

Instantly share code, notes, and snippets.

@k33
Last active August 29, 2015 14:06
Show Gist options
  • Save k33/8f3ed6d4cc8c9c50a100 to your computer and use it in GitHub Desktop.
Save k33/8f3ed6d4cc8c9c50a100 to your computer and use it in GitHub Desktop.
Holding Page Head for Bread & Butter (https://github.com/multiple-states/bread-butter)
<!-- Move to your custom.js file -->
$(window).on( 'resize', function () {
var viewportHeight = $(window).height();
var headHeight = $(".center-head").height();
var customPadding = (viewportHeight-headHeight)/2;
$(".center-head").css({"padding-top": customPadding });
}).resize();
.center-head {
.make-xs-column(10);
.make-xs-column-offset(1);
.make-md-column(4);
.make-md-column-offset(4);
}
<div class="l-strip">
<header>
<div class="l-inner">
<div class="center-head">
<div class="center-head-logo"><?php include ('images/logo.svg') ?></a>
<h1 class="center-head-title">Heading</h1>
<p class="center-head-text">Address line 1<br>Address line 2<br>Address line 3</div>
</div>
</div>
</header>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment