WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Change nav menu item color when you're on that page (5 posts)

  1. kubegusa
    Member
    Posted 2 years ago #

    I have a Twentyeleven Child theme
    http://www.sparklynx.be/preview/demaeyer

    I want to change the color of the menu item when I am on that page. I don't know how to describe this, which is probably why I haven't been able to successfully search for it.
    The default is, that the nav menu item is in bold after you've clicked on it, and you are on that particular page.

    I changed the style of the nav menu to

    #access ul {
    	font-family: 'Verdana', sans-serif;
    	text-transform: uppercase;
    	font-weight: bold;
    	font-size: 17px;
    	list-style: none;
    	margin: 0 0 0 0;
    	padding-left: 0;
    	display:inline-block;
    }

    I basically want the color of the nav menu item to be in blue when I'm on that page. But I don't know where to go to change what I want to change...
    Any pointers would be great.
    Thanks.

  2. kubegusa
    Member
    Posted 2 years ago #

    totally fixed this myself *proud*

    #access .current-menu-item > a,
    #access .current-menu-ancestor > a,
    #access .current_page_item > a,
    #access .current_page_ancestor > a {
    	color: #044c72;
    }
  3. kubegusa
    Member
    Posted 2 years ago #

    solved

  4. aikorei
    Member
    Posted 2 years ago #

    Wow, way to go! I was looking for the exact same thing, so thanks for posting your solution.

    I was actually in the right place, but my problem was that I was using background instead of color. I'm glad to find your solution.

  5. kubegusa
    Member
    Posted 2 years ago #

    Hey that is awesome that my solution helped someone else! And I appreciate you mentioning it. Excellent.

Topic Closed

This topic has been closed to new replies.

About this Topic