How can I change the Current font color on my menu bar?

  • Author
    Posts
  • #1256558

    sharonshero
    Member

    I like the font being bold, but it insists on being black, rather than FFA567. I’ve tried a few other code snippets, but nothing seems to work. I am using the Twenty-Twelve template. Thanks!

    The blog I need help with is lillipop.net.

    #1256641

    timethief
    Member

    Why is this thread tagged for Staff? Does this help? https://en.forums.wordpress.com/topic/twenty-twelve-menu-css?replies=3

    #1256670

    sharonshero
    Member

    I was told by a Happiness Engineer to contact staff if I wasn’t getting an answer in the forum.
    The link addresses far more than I need. I only want to change the color of menu font when on the current page.

    #1256682

    timethief
    Member

    Thanks for the reply. Understood. :)

    #1256819

    To change the color of the menu item for the current post or page in the Twenty Twelve theme, add this to your Appearance → Themes → Customize → CSS panel:

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

    Replace “red” with a color code of your choice.
    http://0to255.com/

    #1256820

    sharonshero
    Member

    That worked! Thank you
    But I didn’t realize I needed to do the same with submenus as well. Can I ask for a snippet more of code to take care of these guys, too?

    #1256825

    Indeed, the colors for menus can get quite involved!

    The example I posted earlier will change the color of the current pageā€”it should work regardless of whether the current page is a main menu item or a submenu item. You have set the current menu item color to blue, and here are two examples:

    1. Go to http://lillipop.net/contact/ and note that “CONTACT” in the main menu is blue.

    2. Go to http://lillipop.net/who-is-lillipop/ and note that the text “WHO IS LILLIPOP?” in the submenu is blue.

    If you mean you want the parent menu item of a submenu to stay blue whenever the current page is one of the submenu items, you will want to add this selector to the example from above:

    .main-navigation .current_page_ancestor > a

    #1256826

    sharonshero
    Member

    I apologize! I am not making myself clear!
    When I land on the submenu page, which then becomes the current page, note that the primary menu name is bold, but grey. I wanted it to turn blue (and remain bold) so that it will signify which primary menu the subpage falls under. I hope I’m making sense–not very conversant with the web-building jargon here.
    But I still want the text in the submenu to remain blue and bold, as you pointed out.

    #1256827

    No worries, it can get a bit tricky!

    When I land on the submenu page, which then becomes the current page, note that the primary menu name is bold, but grey. I wanted it to turn blue (and remain bold) so that it will signify which primary menu the subpage falls under.

    In web jargon, or at least using the words the theme author has to label things, the parent menu items are an ancestor of the current submenu page. Hopefully that makes a little sense :) and I think the example I gave just before your last post will work, did you try adding it?

    #1256829

    sharonshero
    Member

    I did. Not sure what happened the first time since it didn’t work, but went back and tried again just now and voila!
    Thank you so much for your assistance. Everything looks just ducky right now.

The topic ‘How can I change the Current font color on my menu bar?’ is closed to new replies.