3 ms·
Cool! CSS question: how does the page stop the browser from scrolling down to the #anchor? It remains at the top, which is great, but I wonder why?
by TedShiller 5y ago
Cool! CSS question: how does the page stop the browser from scrolling down to the #anchor? It remains at the top, which is great, but I wonder why?
- john-doe 5y agoAt the time I used padding-top for each of the #elements, the header being absolutely positioned. More recently I discovered that you can just use `scroll-margin-top: 100vh`, as seen here: https://cadars.github.io/portable-php/ https://cadars.github.io/portable-php/
- TedShiller 5y agoInteresting, thanks for the tip!