I have an anchor that takes me to a div like so:
<a href="#hot-dogs"> Hot Dogs </a>
The problem is that I have a navbar of 56 pixels of height that hides the element that has been scrolled to. So the user would have to scroll up a little after having hit the anchor to view the element.
Is there a way to make the anchor scroll 56 pixels less to avoid the navbar blocking the element that has been scrolled to?
Or do you suggest an other solution?
CSS or Vanilla Javascript only please.