Support » Theme: Spun » HIghlight Current Menu Item

  • Resolved elotroalex

    (@elotroalex)


    Hi Caroline (and all),

    I’m now trying to change the opacity and color of the current-menu-item class. I added the following to my style.css in the child theme with no luck:

    }
    .main-navigation li.current_page_item a,
    .main-navigation li.current-menu-item a {
    opacity: 1;
    color: red;
    
    }
    .main-navigation ul li.current_page_item ul a,
    .main-navigation ul li.current-menu-item ul a,
    .main-navigation ul ul li.current_page_item a,
    .main-navigation ul ul li.current-menu-item a {
    opacity: 1;
    color: red;
    
    }

    Any ideas? Here is the website.

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

    (@anevins)

    Forum moderator

    Try this;

    .main-navigation li.current_page_item a,
    .main-navigation li.current-menu-item a {
     color: red;
    }

    Are you using a browser developer tool like the one built in to Google Chrome to explore this?
    http://developers.google.com/chrome-developer-tools/docs/elements

    elotroalex

    (@elotroalex)

    I am using Chrome developer tools, yes.

    The solution didn’t work. It’s really weird because Chrome shows me that the CSS rules are active. Even when I tweak them at the item level using Chrome, nothing happens. In theory, even this should work:

    .current-menu-item {
     color: red;
    }
    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    You may need to clear your browser’s cache if you want to see immediate CSS changes on the webpage.

    elotroalex

    (@elotroalex)

    It worked. It was the cache. As soon as I tried it on Firefox I realized. Do you know what I was doing wrong? Why wasn’t it selecting?

    elotroalex

    (@elotroalex)

    Hmm. The opacity doesn’t work. Interesting. I guess it inherits it from the group.

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    Do you know what I was doing wrong? Why wasn’t it selecting?

    Not sure, sorry.

    elotroalex

    (@elotroalex)

    Thanks for your help, Andrew. There seems to be some kind of weird inheritance issue. I’m now experiencing it trying to do some padding tweaks on a regular .page .hentry.

    Fighting on!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘HIghlight Current Menu Item’ is closed to new replies.