I have the following code that scrolls to a certain element:
$('html, body').animate({
         scrollTop: $("#maincontent").offset().top
     }, 400);
However, I have a fixed navbar at the top and so would like to be able to offset this. How can I offset it by a number of pixels?
 
     
    