JS Element.ScrollIntoView Navbar

const navbarHeight = 70
const target = document.getElementById('test')

target.style.scrollMarginTop = `${navbarHeight}px`

target.scrollIntoView()
florinrelea