• Resolved gigusx

    (@gigusx)


    Hello everyone!

    I’ve got a very simple but extremely annoying problem.
    A few hours ago my theme completely bugged out and I was forced to reinstall it completely, since then I can’t change the text color in navigation menu(it worked before).

    my site: https://angrytipster.xyz/premium/

    I want to change the text color in that red button to #fff, everything else is working, even managed to change the a:hover text color which I thought will also be the problem.

    I’m using this currently(have also tried #menu-main-menu and genesis-nav-menu .li angrytips a; etc.)

    #menu-item-81 {
        color: #fff;
    }

    Does anyone have any suggestions? This has priority at the moment:

    .genesis-nav-menu li a {
        color: #222;

    Is there any way to override this and change just this one thing without having to mess with the other colors? I’ve used !important but it doesn’t work either, I’m 100% sure the code is correct cause other customizations work fine.

    And if there isn’t, what would be the quickest way/safest way to change it so that the other colors will stay the same and I’ll get the effect I want? I can change css here and there when I need it but am not good at coding so advice would be appreciated!

    I’m using Simple Custom CSS for this but I’ve also tried editing it in style.css from the editor menu in wordpress.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You can simply use an extra level of specificity:

    html .genesis-nav-menu li a {
        color: #222;
    }

    Thread Starter gigusx

    (@gigusx)

    Do I just put this in CSS?
    The color code you gave me is what I’m trying to change, what I meant is to override the .genesis-nav-menu with the first code(#menu-item-81).

    I’ve tried it like this:

    html #menu-item-81 a {
      background-color: #eb232f;
      	color: #fff !important;
    }

    and

    html #menu-item-81, genesis-nav-menu-li a {
      background-color: #eb232f;
      	color: #fff !important;
    }

    With and without the !important, unfortunately they didn’t help.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Do I just put this in CSS?

    Yep, the Custom CSS plugin that you’re using.

    https://angrytipster.xyz/?sccss=1&ver=4.5.3

    Have you cleared the cache after changing the css code? I see you use W3 Total Cache plugin. It seems cache issue.

    Thread Starter gigusx

    (@gigusx)

    Yep, the Custom CSS plugin that you’re using.

    I did try that, didn’t change anything ??

    Have you cleared the cache after changing the css code?

    Yes, I cleared it every time! Also testing sometimes with ‘inspect’ option in chrome to try and see how the text reacts to code in real time but nothing seems to work

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    If you look at the Custom CSS plugin, it looks like the code you’re saying should be there (and the code I recommended) is absent. So that’s why it appears to be a caching issue: https://angrytipster.xyz/?sccss=1&ver=4.5.3

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    By the way, I accidentally posted ‘#222’ as the colour in my recommendation. You can change that.

    Also testing sometimes with ‘inspect’ option in chrome to try and see how the text reacts to code in real time but nothing seems to work

    It works with inspect element in chrome https://prntscr.com/c0ngdp

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Whether something is working in inspect element doesn’t necessarily mean you’re using the right selectors. When you create new CSS rules in the inspector tool, it is effectively in another stylesheet loaded after all of your website’s stylesheets.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I see that you went for this option;

    html #menu-item-81 a {
      background-color: #eb232f;
      	color: #fff !important;
    }

    In that case you don’t need the additional selector of “html” because the ID dominates.
    https://developer.mozilla.org/en/docs/Web/CSS/Specificity

    Thread Starter gigusx

    (@gigusx)

    It works with inspect element in chrome https://prntscr.com/c0ngdp

    It didn’t work for me in inspect but it does work now! It actually took a while to show up.

    Thanks guys! I didn’t know that adding “html” to the code can help override things like this.

    By the way, I accidentally posted ‘#222’ as the colour in my recommendation. You can change that.

    Yeah, I wasn’t gonna argue so I just tested both of them, the one with the correct color didn’t show up on page within the first minute and I changed it =p

    Thanks again guys, really appreciate this!

    Thread Starter gigusx

    (@gigusx)

    I see that you went for this option;
    html #menu-item-81 a {
    background-color: #eb232f;
    color: #fff !important;
    }
    In that case you don’t need the additional selector of “html” because the ID dominates.
    https://developer.mozilla.org/en/docs/Web/CSS/Specificity

    I’ve changed it like 15 minutes ago and without “!important”, I’ve had this for like an hour earlier today (!important and without the “html” selector) and it didn’t work then. Do you guys think this could be the W3 Total Cache’s issue? I’ve haven’t had problems with it before and the plugin is recommended everywhere.

    It could be w3 total cache’s issue or web hosting’s cache. Try to disable w3 total cache and clear the cache. If the issue still exists then maybe it’s web hosting’s cache.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Can't change the text color of one item in navigation menu’ is closed to new replies.