![]() |
VOOZH | about |
Usually, an anchor is placed below a heading, like this: User:Simanelix/Example1/Sandbox § Another_Heading (click [edit source] to see the wikitext). Now, notice that the anchor placed at the same spot does scrolls you father down the page (and that you can't see the heading): User:Simanelix/Sandbox/Example1 § some_alt_name. I am proposing we fix this issue by adding 2 new parameters to {{Anchor}}. The new parameters are offset-el and offset-attributes. offset-el can be any valid HTML element tag name, and offset-attributes is additional attributes to be added to the HTML element's tag. The HTML element created by these 2 elements can be called the offset (but doesn't correspond to an actual parameter). The offset is used to determine how far up on the page the anchor should be offset. Setting offset el to h2 in my example (User:Simanelix/Sandbox/Example1 § some_alt_name) would result in the anchor being correctly displayed just above the heading. --Simanelix (T|C) 13:12, 24 April 2024 (UTC)