[Resolved] .category-ID CSS not working for background color (Dark theme on specific posts)

Home Forums Support [Resolved] .category-ID CSS not working for background color (Dark theme on specific posts)

Home Forums Support .category-ID CSS not working for background color (Dark theme on specific posts)

Viewing 12 posts - 16 through 27 (of 27 total)
  • Author
    Posts
  • #1341235
    David
    Staff
    Customer Support

    Try this CSS:

    body.single.category-photography {
        background-color: #000;
    }
    .single.category-photography .inside-article,
    .single.category-photography .comments-area,
    .single.category-photography .page-header,
    .single.category-photography .paging-navigation,
    .single.category-photography .inside-page-header {
        color: #fff;
    }
    #1341885
    Joey

    That did the trick. Thank you both so much, it looks really good.

    JC

    #1342248
    David
    Staff
    Customer Support

    Glad we could be of help

    #1349024
    Joey

    Sorry, I just realized one last thing. My text hover color is normally black, but on dark mode that renders it invisible, so I had added this code to make the hover color on dark mode white instead:

    body.category-photography a:hover,
    a:active {
    color: #fff;
    }

    It worked, however now when I hover on the title in the blog or category archives, the title turns white on a white background. I just realized this. Is there a way I can make the above code only take effect within the body of my photography category?

    #1349229
    David
    Staff
    Customer Support

    Try single.category-photography a:hover

    #1349987
    Joey

    This fixes it when I hover on the blog or category archives, but now when inside the text of the article hovering on links doesn’t change the color (neither black like before nor white like it should be).

    #1350506
    David
    Staff
    Customer Support

    Maybe this is what you need?

    .single.category-photos .entry-content a:hover,
    .single.category-photos a:active {
        color: #fff;
    }
    #1351044
    Joey

    That did it, thank you. I guess my code was missing a couple things. It looks really good, thanks for all your help.

    #1351345
    David
    Staff
    Customer Support

    I must admit – its a bit of a mind bender lol

    Glad to be of help

    #1390224
    Joey

    You guys are going to hate me, but I noticed one last (small) issue. The “post comment” button at the bottom of the page is invisible because it is normally just black letters. I’m trying to find where I can adjust the class of that button (i.e. white text color) to make it visible.

    Inspect element just tells me the class is “submit”. Not sure how I can fix it. Thank you.

    #1390500
    Leo
    Staff
    Customer Support

    Any chance you can open a new topic for the question?

    Thanks 🙂

    #1392114
    Joey

    Yes, thank you.

Viewing 12 posts - 16 through 27 (of 27 total)
  • You must be logged in to reply to this topic.