Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Current Navigational Highlighting #2

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #43455
    mintertweed
    Participant

    My previous thread is a bit convoluted due to my ramblings. I heavily thank @AlenAbdula and @TheDoc for their wonderful help though. With @AlenAbdula’s suggestion, I added theme support for menus in Starkers v4.0 and then I promptly placed my menu in my header.php file. To see a current version of my code, visit this CodePen. You will notice something though if you look at the code closely. “Shop” should be highlighted, because it is the only page with a class of current-menu-item and I specifically call out that class in my CSS with this:

    .current-menu-item {
    color: #FFFEF2;
    }

    This should highlight “Shop” in particular. Or any page that has that class. So, my question is, how do I fix it? @AlenAbdula has a working CodePen, here, using the same method. What am I doing wrong? Thank you in advance!

    #128576
    amyth91
    Participant

    Try this.

    .current-menu-item a {
    color:#FFFEF2 !important
    }

    #128581
    Senff
    Participant

    No need to use !important (which I personally try to avoid like the plague if I can help it) if you use this line:

    .menu-navigation-container ul li.current-menu-item a {
    color:#FFFEF2;
    }

    #129657
    Alen
    Participant

    Glad everything is working for ya. Is this ready to be marked as solved once and for all :)

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.