Skip to content

Instantly share code, notes, and snippets.

@jamesslock
Created August 13, 2013 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jamesslock/6223554 to your computer and use it in GitHub Desktop.
Save jamesslock/6223554 to your computer and use it in GitHub Desktop.
Set site hero to match browser height.
$(function(){
$('.site-header') .css({'height': (($(window).height()))+'px'});
$(window).resize(function(){
$('.site-header') .css({'height': (($(window).height()))+'px'});
});
});
@caleuanhopkins
Copy link

$(function(){   
    $(window).resize(function(){
        height = window.innerHeight;
        $('.site-header') .css({'height': (height-20)+'px'});
    });
});

Try that mate, should work.

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