Remove anchor class

Hello,
I have links in wordress menu with an anchor and there is a class who is automatically added to anchor who prevents me to change color of the menu font and his left border.

i tried :

.x-anchor[class*=“active”] .x-anchor-text-primary {
color:rgba(250,250,250,0.7) !important;
border:rgba(250,250,250,0.7) !important;
}
.x-anchor[class*=“active”] .x-anchor-text-primary:hover {
color:#fbcc00 !important;
border:#fbcc00 !important;
}

but it only affect the text and not the whole button, also the left border is not affected.

How to change the font and border color of normal and hover states of anchor ?

Or is it possible to remove the x-anchor class ?

Hello @Lyser,

Thanks for writing in!

The menu items will have the x-always-active and the x-currently-active classes. You can use the following for your code format instead:

.x-anchor.x-always-active {
   /* your styling here for the active menu item*/ 
}

.x-anchor.x-currently-active {
   /* your styling here for the current active menu item */ 
}

Be advised that this is beyond the scope of our support under our Support Policy. If you are unfamiliar with code and resolving potential conflicts, you may select our One service for further assistance.

Best Regards.

Thx for answer but it’s not changing the color (even with !important)

.x-anchor.x-always-active {
color:red !important;
}

.x-anchor.x-currently-active {
color:blue !important;
}

Hi @Lyser,

To change the Text color you need to add the .x-anchor-text-primary class along with your code and it will look like the following.

.x-anchor.x-always-active .x-anchor-text-primary 
{
    color:red !important;
}
.x-anchor.x-currently-active .x-anchor-text-primary
{
    color: blue !important;
}

Please remember that the above code will work if copied as it is and doesn’t conflict with any existing style.
Please note that the code provided serves only as a guide to help you get started custom coding on your own if there’s no option offered in our theme or the products we bundle.
We really do not provide support for custom codes which means we can’t fix it in case it conflicts with something on your site nor will we enhance it.

Thanks

Perfect, thank you very much.

Hi @Lyser,

Glad that we are able to help you.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.