command to scroll the screen a little, for anchor links
-
Hello, I have assigned the category “anchor” to the ID that I enter into the HTML tags where the destination for anchor links is located. Example
<p id=”jump” class=”anchor”>anchor link1</p>
and then I should use this CSS code:
.anchor {
scroll-margin-top: 60px;
}It is to scroll the page of a little space, when the screen points to the destination of an anchor link. Since the menu bar is set as sticky, the destination row of the anchor link is covered by the menu. You can see it here:
https://www.tycospages.com/section-5/The problem is that the command “scroll-margin-top” seems to be wrong. It is shown with red color and doesn’t work. I have not found similar commands with “scroll”. Which is the right command?
- The topic ‘command to scroll the screen a little, for anchor links’ is closed to new replies.