latest  //  code

Making Space Above Hash Tag Link Elements

It’s easy enough to create links that take you to an element further down the page, but top margins and padding on your element are not respected, resulting in the element arriving flush against the top of the browser window. This often isn’t an ideal aesthetic situation. Using the :before pseudo element, we can create space that will be respected once the page scrolls to its destination.