Ok, amateur question here but im really bumping my head.
Using the jQuery below, i would like to add margin-top:-100px; to the height value.
Please help! Thanks
If I understand correctly this should do it:
$(function () {
function HomePageSize() {
var winHeight = $(window).height(); // store height in variable
var myMargin = winHeight - 100; // deduct 100 from height
$('#home').css({
width: $(window).width(),
height: winHeight,
marginTop: myMargin // assign calculated value to margin-top
});
}
$(window).resize(function () {
HomePageSize();
});
HomePageSize();
});