C
C
Chian2021-06-07 15:16:21
css
Chian, 2021-06-07 15:16:21

How to make anchors work properly?

Good afternoon. Tell me, please, where to dig.
The essence of the problem is as follows.
When you click on a menu item in the page header, it should scroll to a certain block. When the page is fully loaded i.e. I manually scrolled it down and then up, then the anchors work perfectly. And in the case when we just went to the site and clicked on any menu item, the page scrolls more than necessary.
What could be the problem?
Site on wp, using autoptimize with lazyLoad enabled. Maybe the problem is in it, if so, how to get around it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Chian, 2021-06-24
@Chian

I don't know what exactly the problem was connected with, but I solved it by setting height: 530 px for the "portfolio" block elements. There are 6 elements in the block that are displayed in two rows at a screen resolution of more than 1200 px.
Rather a crutch, but the situation was nevertheless resolved.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question