diff --git a/assets/js/main.js b/assets/js/main.js index 811bd2ea13..bb7e2c1d0b 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -20,7 +20,7 @@ $(function() { }); $("nav ul li").on("click", "a", function(event) { - var position = $($(this).attr("href")).offset().top - 190; + var position = $($(this).attr("href")).offset().top - parseInt($('section').css('margin-top')); $("html, body").animate({scrollTop: position}, 400); $("nav ul li a").parent().removeClass("active"); $(this).parent().addClass("active");