-
CSS pro tip: [id] { scroll-margin-top: 2em; }
-
…in reply to @piccalilli_
if you're a super fancy pants: [id] { scroll-margin-top: 2ex; }
-
…in reply to @piccalilli_
I’ve turned this into a proper quick tip now: piccalil.li/quick-tip/add-scroll-margin-to-all-elements-which-can-be-targeted
-
…in reply to @piccalilli_
Video alt: An article of content with a "scroll to the target" link. When it is pressed, the page scrolls down to the targeted element, smoothly.