Unable to change Main Menu Text Color

I have attempted to change the text color for the menu via a child theme i’ve made for west.
I did so the first time by attempting to add the following code to the styles.css file:

ul#primary-menu > li.menu-item > a {
    color: black;
}

I attempted it again by adding this line of code instead:

.main-navigation a {
    color: #000000;
}

Even this did not work. So I attempted using the Simple Custom CSS, and used the first line of code. It worked, but my site suffered a severe wait time increase of 20+ seconds as a result. Therefore I wish to make this change directly by editing the style sheet rather than by relying on the plugin.
As far as i’m aware the child theme has been installed properly as I have edited footer.php without any issue.

Any assistance with regard to solving this issue would be much appreciated.

Hello there,

Please try adding an !important argument to set priority execution:


ul#primary-menu > li.menu-item > a {
    color: black !important;
}

Regards,
Kharis

Hi Kharis,

The Code,

ul#primary-menu > li.menu-item > a {
    color: black !important;
}

did not work.

Please be sure that the group of CSS code in your custom CSS is error free. You can validate it here: https://jigsaw.w3.org/css-validator/#validate_by_input

If your site is being cached by a plugin like W3 Total Cache, you have to clear the cache after altering a new code. Otherwise, it won’t be read.

Regards,
Kharis

Caching is off on the website and I’ve ensured that the only additional code on the style.css on the child theme is the one you have specified. I have also attempted to change the parent themes style sheet by adding the code you mentioned but it had no effect either. Right now I am using an alternative plugin to Simple Custom CSS that seems to be doing the job with a much lower wait time increase, but i’m still looking for a manual method to get it to work.

Hi Kharis,

I’m working into the header option and I dont found how to keep the orange effect when i change the main menu text color. I’m using the css code that you have submitted and it works very well !!

If it possible, as the css code text color, to choose the effect color (blue for example instead of the orange).

Thank you in advance. Regards, Nassim

Hello Nassim,

What do you mean by “effect color” here? Could you elaborate it?

Regards,
Kharis

Hi Kharis, thanks for your quick feed-back. I have fixed it. Thanks a lot. Kind regards, Nassim

Awesome! You’ve been able to manage it.

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