Skip to content

Instantly share code, notes, and snippets.

@davidbegin
Created March 8, 2013 03:00
Show Gist options
  • Save davidbegin/5113905 to your computer and use it in GitHub Desktop.
Save davidbegin/5113905 to your computer and use it in GitHub Desktop.
Resizing margins based on window size
$('.home_details').css("margin-top", function(){
if ($(window).height() > 642) {
return "0px";
} else {
return (((642 - $(window).height())) / 6.8) + "px";
console.log(737 - ($(window).height()) + "px");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment