• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Can't get current menu item to be a different color

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Can't get current menu item to be a different color

This topic is: not resolved
  • This topic has 7 replies, 4 voices, and was last updated 12 years, 4 months ago by computerkitten.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • October 23, 2013 at 11:11 pm #68555
    computerkitten
    Member

    Have a CSS question... in the menu, I want the current page menu item to be blue. Can't seem to figure this out with my custom menu. I've tried:

    div#mymenu .current-menu-item > a and so forth correctly and that didn't work. Ideas? Its just a 2 page website but want to know which page I'm on once I click one of the two.

    Website is here:

    http://tinyurl.com/la7j6eb

    THANK YOU

    October 24, 2013 at 2:24 am #68568
    Sridhar Katakam
    Participant

    Add this CSS:

    .page-id-34 #mymenu a:nth-of-type(2n+1),
    .page-id-44 #mymenu a:nth-of-type(2n) {
        color: #6689cc;
    }

    Genesis Tutorials | Follow me on Twitter

    October 24, 2013 at 4:16 am #68580
    jhguynn
    Member

    Computerkitten: Be aware that the navigation items have css in two places in your style sheet: (1) under the section for navigation and (2) under the section for theme colors. Since the styles "cascade", if you change something in the navigation section but not in the theme color section, you may not see the changes. Pretty sure you only need to mess with the theme color section of your targeted class is in both places.

    October 24, 2013 at 8:27 am #68618
    computerkitten
    Member

    Sridhar - I have never seen this syntax before in CSS... can you please explain this?

    ":nth-of-type(2n+1),
    .page-id-44 #mymenu a:nth-of-type(2n) {"

    Jhguynn - I will take a look at the theme color section, thank you!

    October 24, 2013 at 8:58 am #68625
    Sridhar Katakam
    Participant

    .page-id-34 #mymenu a:nth-of-type(2n+1)

    selects the first anchor element under ".page-id-34 #mymenu"

    .page-id-44 #mymenu a:nth-of-type(2n)

    selects the second anchor element under ".page-id-44 #mymenu"

    See http://nthmaster.com/ (scroll down to "USING THE :NTH-OF-TYPE" section)

    You could also just perhaps use ":nth-child(n)" to simplify things. Give it a try if you would like.


    Genesis Tutorials | Follow me on Twitter

    October 24, 2013 at 2:44 pm #68694
    computerkitten
    Member

    Sridhar - thank you for explaining... but whatever happened to the .current-menu-item that I thought used to work? I've never seen this done this way before. Is this part of HTML5?

    Thanks!

    October 24, 2013 at 4:18 pm #68719
    emasai
    Participant

    No it's CSS3. http://www.w3schools.com/cssref/sel_nth-child.asp - It's a rather complicated syntax, but you could possibly target your menu item by using a custom class. If you do not see the option on your menu item, go to Screen Options and check CSS Classes then add the class you want to target to your menu item.


    Need Website Customization or a Responsive CSS fix? Contact Me
    Lynne emasai.com

    October 24, 2013 at 5:15 pm #68731
    computerkitten
    Member

    Sridhar that worked, thank you!!!
    Emasai - thank you for the w3schools link...will read up on that! I did this menu as a text widget because they wanted text just before the menu items. But thank you for all of your help!!!!

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble