-1

I'm trying to highlight the current page in the wp nav menu. I've read through the codex and found .current-menu-item, which I'm using in my CSS.. However it's not working. What am I missing?

css

#header nav {
    float: left;
    padding-left: 25px;
    padding-top: 12px;
}

#header nav ul li {
    display: inline;
}

#header nav ul li a {
    color: #333333;
    font-family: amatic;
    font-size: 150%;
    padding-right: 25px;
}

#header nav ul li a:hover {
    color: #c6e000;
}

#header nav ul li a:last-child {
    padding-right: none;
}

#header nav .current-menu-item {
    color: #c6e000;
}

html/php

<div id="header">
     <nav>
    <?php wp_nav_menu( array('menu' => 'nav' )); ?>
     </nav><!-- end nav -->
</div><!-- end header -->

live site

1 Answer 1

1

Since the text that displays your navigation is made out of anchor points, which has the color: #333333; assigned, you'll have to add the .current-menu-item color to the anchor itself:

#header nav .current-menu-item a { color: #c6e000; }

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.