If I have a non-scrolling header in an HTML page, fixed to the top, having a defined height:
Is there a way to use the URL anchor (the #fragment part) t
#fragment
You can do this with jQuery:
var offset = $('.target').offset(); var scrollto = offset.top - 50; // fixed_top_bar_height = 50px $('html, body').animate({scrollTop:scrollto}, 0);