Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1263337
    Missy S
    Participant

    Hello, I am trying every combination I can think of but I am unable to find the correct css to target one category. Please help.

    x-entry-share .single-post .category-doc-video-media {
    padding: 0px !important;
    background-color: #333 !important;
    margin: 10px 0 2.15em;
    }

    #1263339
    Missy S
    Participant
    This reply has been marked as private.
    #1263389
    Friech
    Moderator

    Hi There,

    Thanks for writing in! But on what category you want to apply that? The code should something like this:

    .background-category-drug-policy .x-entry-share {
    	padding: 0px !important;
    	background-color: #333;
    	margin: 10px 0 2.15em;
    }

    Hope it helps, Cheers!

    #1263461
    Missy S
    Participant

    Hi,

    Did not work.

    I want all of my posts with video-media category slug to have a black background. I used this code and it changed the background color of all of my posts, not just the category video-media.

    .category-video-media .blog .site,
    .single-post .site {
    background-color: black !important;
    }

    Your css didnt change anything. Hmmm.
    .background-category-video-media .x-entry-share {
    padding: 0px !important;
    background-color: #333;
    margin: 10px 0 2.15em;
    }

    #1263465
    Christopher
    Moderator

    Hi there,

    Please add this code :

    .background-category-alcohol.background-category-audio.background-category-cocaine-2.background-category-drug-policy.background-category-heroin-2.background-category-marijuana.background-category-podcast.background-category-racism .site {
        background-color: #000;
    }

    Hope it helps.

    #1263492
    Missy S
    Participant

    I am confused by your css. I did not ask for every category on my site to be black. That’s one of the problems I am trying to fix. LOL

    I have 2 issues:
    1) I want the background color of ONE category to be black.
    2) I want the background color of the entry share to be gray in that same category.

    I renamed the video-media slug to video and I used this css but only the BODY is changing I want the entire post to change. usually I use .site – not working.:

    .category-video {
    background-color: #000;
    }

    .x-entry-share. category-video {
    padding: 0px !important;
    background-color: #333 !important;
    margin: 10px 0 2.15em;
    }

    #1263505
    Christopher
    Moderator

    Hi there,

    Categories are being added to article tag not body tag. So we can’t target all posts with one selector, see the attachment.

    You have to target post ID or post format, e.g :

    .single-post.postid-13582 .site {
        background-color: #000;
    }

    Or

    .single-format-standard .site {
        background-color: #000;
    }

    Hope it helps.

    #1263517
    Missy S
    Participant

    Please clarify,

    It is not possible to change the background color of all 50 posts within a category.

    It must be done 50 individual times?

    #1263533
    Christopher
    Moderator

    Hi there,

    As I mentioned in my previous replay, it’s not possible to target all pages at once .
    You can do this with one block of code, just separate selectors with comma.

    e.g :

    .single-post.postid-13582 .site,.single-post.postid-13583 .site,.single-post.postid-44 .site {
        background-color: #000;
    }

    Hope it helps.

    #1263536
    Missy S
    Participant

    Thanks for the workaround. This is very helpful!

    #1263548
    Christopher
    Moderator

    You’re welcome.

  • <script> jQuery(function($){ $("#no-reply-1263337 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>