I have a page where a scroll bar containing table rows with divs in them is dynamically generated from the database. Each table row acts like a link, sort of like you\'d see
Found a workaround solution. Say that you want to scroll to an div, Element here for example, and you want to have a spacing of 20px above it. Set the ref to a created div above it:
Doing so will create this spacing that you want.
If you have a header, create an empty div as well behind the header and assign to it a height equal to the height of the header and reference it.