Offset anchor
Want to navigate to a section on a page, but have a navbar obstructing your view? Offset your anchors with this utility to fix that.
Fixed-top navbars often obstruct your view when navigating to a specific place on a page. Offsetting your anchors slightly will solve this issue, which can be done using this utility class.
Usage
Create an element with an id
to reference to, and add the .offset-anchor
to offset its position vertically by -75px
, so that you will end up slightly above the anchor element once navigated.
<a class="offset-anchor" id="yourreference"></a>