Okay
  Public Ticket #1634903
Links color for Categories list
Closed

Comments

  • noirvif started the conversation

    Hi,

    On my portfolio page, I have a list of categories. That's wonderful, but, I would like to change the aesthetic of it. I've already delete the underline effect by adding this to the CSS :

    a:after {
        background-color: transparent !important;
    }

    But now, I would like the name of the categories I click on to be black when active. I already tried options with "a:hover" ; "a:active" but nothing seems to work. 

    Same thing with the two entries of my main menu. 

    Could you help ?

    Thanks a lot.  

  • [deleted] replied

    Hi noirvif,

    Please add the code below to your Custom CSS area:

    .portfolio-category-item.active a {
        color: #000 !important;
    }
  • noirvif replied

    Thank you so so much ! It works really well. 

    How can I do the same thing with the items of the main menu ?

    Thank again.

  • [deleted] replied

    I'm glad to hear that.

    Please just add the code below to your Custom CSS area:

    li.current-menu-item a span {
    color: #000 !important;
    }

  • noirvif replied

    Wow, thank you very much for your quick reply ! 

    And sorry to insist with this, but is there a way to apply this property to any list I could create in html ?

    Many thanks.

  • [deleted] replied

    Hi noirvif,

    Glad to hear that

    As for your last question: Can you please try to be very specific about the question and explain it more to us, in this way we can easily understand you and give you the proper answer.

    Thanks!

  • noirvif replied

    Hi Ylli,

    I've created two pages on my website. On the first one there is a portfolio page with a list of categories. On the other one it's just a single page with some text and images. On this one I've created a list (<ul><li>about</li><li>services</li><li>clients</li><li>contact</li></ul>) so we can navigate inside the page with anchor links to "about", "services", "clients" and "contact". I would like this list to act like the list of portfolio categories : when the link is active, the word stays in black.

    I add two screenshots of the two pages, to help understand. 

    Thanks !

  • [deleted] replied

    Hi noirvif,

    Sorry but this is not possible to do in the area that you created the menu. Because your menu doesn't have a selector that tells you which menu is clicked so we can style it.

    If you're looking for professional help in this matter, there's always someone available for such tasks on the WP Kraken or Codeable. Pricing and timeline are always straightforward there and that's the main reason for recommending those services.

    Have a great day!