Forums

[resolved] current-cat inheriting wrong color (5 posts)

  1. kane250
    Member
    Posted 3 years ago #

    Hi everyone,

    I'm having a weird issue here. I am modifying a theme called oulipo and am changing the styling for the current-cat items so they will be styled differently when the current page is selected. In the CSS I modified the .current-cat class accordingly (italic, bold, and black), but for some reason it only styles the current categories italic and bold, but keeps the original color (gray). I use firebug and am finding that it is getting the color from #main_nav a even though I have black in the current-cat class, and it is getting 2 out of 3 of my styles from it.

    Is there any reason why the main_nav a would override current-cat for text color? This is a really weird issue.

    Here is a link to the page. Any help on this would be truly appreciated.

  2. stvwlf
    Member
    Posted 3 years ago #

    Hi

    The issue is the color needs to be applied to the <a> tag, not the <li>

    your css can be
    .current-cat a { color: #000; }

    if that doesn't work you need to be more specific
    #main_nav li.current-cat a { color: #000; }

  3. kane250
    Member
    Posted 3 years ago #

    Ahh the second one worked like a charm. Thanks!

  4. kane250
    Member
    Posted 3 years ago #

    Hi, sorry to bother again, but I also have a page in my nav that doesnt use the same classes as the categories since it's a page. I tried replicating what you said here for current_page_item, and it will go black. Any ideas why this might be different?

  5. kane250
    Member
    Posted 3 years ago #

    ok sorry, scratch that...I had a typo! Thanks again!

Topic Closed

This topic has been closed to new replies.

About this Topic