Apparently it is not possible to use bookmarks (id="") in a menu to get to a certain point on a page (via #mark)
Or am I overlooking something?
Apparently it is not possible to use bookmarks (id="") in a menu to get to a certain point on a page (via #mark)
Or am I overlooking something?
Hi Egmund,
the trick is to use the full url, like:
http://your-domain.tld/your-page-path#your-id
If full URLs are problematic, e.g. when you have two environments of the same site, you can use the path without the domain. Just use the 'system' path, for example:
node/123#your-id
My mistake was using the title/name of the page instead of node number.
Now only one problem left:
The link jumps to right under the H3 with the 'id' - why?
Do I need to set the id in something above where I want it - like a <div>?
The page in question is: https://paradentoseoplysning.dk/en-detaljeret-forklaring-af-paradentose
This is because of the sticky header menu.
What you will need is some way of offsetting it. Here is one example:
https://stackoverflow.com/a/13184714/24246072
Give your anchor a class:
<a class="anchor" id="top"></a>
You can then position the anchor an offset higher or lower than where it actually appears on the page, by making it a block element and relatively positioning it. -250px will position the anchor up 250px
a.anchor { display: block; position: relative; top: -250px; visibility: hidden; }
Here is another idea:
https://getpublii.com/blog/one-line-css-solution-to-prevent-anchor-links...
Thank you - that works - the first one.
If full URLs are problematic, e.g. when you have two environments of the same site, you can use the path without the domain. Just use the 'system' path, for example: