Plugin Author
malihu
(@malihu)
Hi,
The option to use is “Offset” (more info).
The issue is that your links are currently handled by another plugin: “jquery-smooth-scroll”. In order to use “Page scroll to id” with all its options (like offset), you need to deactivate “jquery-smooth-scroll”. Both plugins have more or less the same functionality, so you need to choose which one to use.
If you choose to use “Page scroll to id”, you can set the value of the “Offset” option to be your sticky menu selector:
.sticky-header .site-header
or
.sticky-header .site-header:fixed
to bypass the offset on mobile view.
The “empty space” can be fixed by adding the following CSS in your theme:
#main > article:first-child {
padding-top: 0;
}
-
This reply was modified 9 years, 5 months ago by
malihu.
Thread Starter
yimyo
(@yimyo)
thanks for the help!
I got one more question regarding the menu highlighting. When I click on a menu item it scrolls there and highlights it, but however when I scroll away, the clicked is still highlighted. I tried using the force one highlight in the setting but it’s not working.
edit: also sometimes multiple highlights when you go scroll precisely in the middle. I tried the .mPS2id-highlight-first and -last
-
This reply was modified 9 years, 5 months ago by
yimyo.
Plugin Author
malihu
(@malihu)
The clicked link stays highlighted because you have the following CSS:
.menu-item a.mPS2id-clicked {
color: #9B5F00;
}
Remove the above if you don’t want that.
For the multiple highlighted links issue, try disabling “Highlight by next target” and/or “Keep highlight until next”.
You should also try to have equal height images/content inside your image slider (otherwise, the slider changes the total length of your page which affects scrolling and highlighting).
-
This reply was modified 9 years, 5 months ago by
malihu.
Thread Starter
yimyo
(@yimyo)
I deleted:
.menu-item a.mPS2id-clicked {
color: #9B5F00;
}
but it highlights the default blue instead now
Plugin Author
malihu
(@malihu)
This is because of your theme’s stylesheet:
...wp-content/themes/shoreditch-wpcom/style.css, line 1176
.main-navigation a:focus,
.main-navigation a:hover {
color: #3e69dc;
}
You need to remove the .main-navigation a:focus selector.
Thread Starter
yimyo
(@yimyo)
Thanks! I solved it by making .main-navigation a:focus, to the same color as my original menu and making .menu-item a.mPS2id-highlight !important to overlap it.
-
This reply was modified 9 years, 5 months ago by
yimyo.
Plugin Author
malihu
(@malihu)
Great π
Gonna mark this as resolved.
Thanks a lot for your rating and review too!