Need help? Check out our Support site, then


Change font color of menu item when submenu is selected

  1. slambpoetryslam
    Member

    Hi,

    I'm using the oxygen theme and want the font color of the main menu item (primary menu on top) to change when one of its sub-menu items is selected (the main menu items stand for different events and I want people to always know which event's page they're on when they are eg looking up the dates)

    Is there a CSS code for something like this?

    Thanks!

    The blog I need help with is slambslamp.wordpress.com.

  2. Hello,

    In your custom css option:
    if you add the following bit of code will change the background of your top menu item nicely wrapped around the word and highlight current submenu in addition:

    li[class*="current"] > a {
      background-color: #FFC0CB;
    }

    Hope this helps,

    grtz~

  3. slambpoetryslam
    Member

    Hi,

    thanks for the suggestion, works great!

  4. slambpoetryslam
    Member

    I'm using a different code now, so just the font color changes (no background color). Thought I would share it here in case anyone who looks up this topic might find it useful:

    .main-navigation ul li a {
    color: #0247b5;
    }

    .main-navigation li[class*="current"] > a {
    color: #75a9fd;
    }

    .main-navigation ul li a:hover {
    color: #75a9fd;
    }

    .main-navigation ul li a.active,
    .main-navigation ul li a.active:hover {
    color: #75a9fd;
    }

  5. Excellent! thanks~

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags