I know that to automatically scroll to a specific div, I can use #id in the URL like this:
example.com/page#id
Is there a way to create a URL so that the page is scrolled to #id and the div is centered on the page? Currently, by default, the page scrolls so that the div touches the top of the page.