Onepage highlight menu when scrolling

Hello
I read many forum post about this but it is still not working on my site.
I installe scroll-to id.
In Design - customise - css i entered

.mPS2id-highlight {
color: #a30101;
background-color: #ad906e;
font-weight: bold !important;
}

In Menus i gave the CSS Class “ps2id”

Scrolling to the different sections is good, but no highlight on menus

My side is “schertz dot xpressdataservice dot de”

Thank you for your ideas and help

Did you follow this solution?

Ensure you’ve cleared any applied cache as it blocks recent changes to take effect.

Regards,
Kharis

Hello Kharis

Thank you for you answer. I followed this instructions and watched many videos. Still have the problem.
Can I send you login datas so you can have a look if I missed anything ?

Alex

Hello Kahris

Following solution worked now for me

I added a scrip from an other reply from you
#mainnav ul li.current_page_item > a,
#mainnav ul li.current-menu-ancestor > a {
color: #fff000;
}
and now it is working

Thank you for your help

Alex

Great! You did a good job Alex.

Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

Regards,
Kharis

Hi Kharis.
It only worked for one time while I was logged into Wordpress. Now it is not working anymore

I tried to change the custom css only to :

.mainnav .menu-menu2 > a.mPS2id-highlight{
color: green;
}

This is the only CSS Code I have on my website.
I am using Sydney Pro Theme.

I don’t get it to work

Can you pleas have a look at my side, how exactly I have to write the CSS Code

Thank you

Alex

Hello Alex,

It looks like CSS classes has changed. Please try replacing the existing code with this one:

    .mainnav .mPS2id-clicked {
      color: green !important;
    } 

Let me know how it goes.

Regards,
Kharis

Hello Kharis

Thank you for your help

Now its highlights when I click on the menu.
But highlighting different menus when scrolling on my side still don’t work.

I also tried to add
.mainnav .mPS2id-highlight {
color: #a30101 !important;
background-color: #ad906e !important;
}

Do you have any other idea

thank you again

Alex

Hello Kharis

I mailed with the author of the plugin an he found the error.
It might help others too.

The error was in the menu links

I had : //schertz.xxxxxx/#Home

I needed to change it to only : /#Home

in the CSS:
.mPS2id-highlight {
color: #a30101 !important;
background-color: #ad906e !important;
}

Now it is working

Thank you for your time an help

Alex

Here are some more tips from the author of Scroll to ID

If you want to have your other page link highlighted the same way “Page scroll to id” links are highlighted, you can add the following CSS:

.current-menu-item a:not(._mPS2id-h) {
color: #a30101 !important;
background-color: #ad906e !important;
}

Hope it helps someone too

Alex

Hello Alex,

Awesome! You figured it our yourself. Thank you very much for sharing. It’s really appreciated.

Have a nice day!

Regards,
Kharis