Tagged: x
-
AuthorPosts
-
November 18, 2016 at 11:08 pm #1263337
Missy SParticipantHello, 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;
}November 18, 2016 at 11:12 pm #1263339
Missy SParticipantThis reply has been marked as private.November 19, 2016 at 1:29 am #1263389
FriechModeratorHi 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!
November 19, 2016 at 3:07 am #1263461
Missy SParticipantHi,
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;
}November 19, 2016 at 3:15 am #1263465
ChristopherModeratorHi 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.
November 19, 2016 at 4:25 am #1263492
Missy SParticipantI 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;
}November 19, 2016 at 4:55 am #1263505
ChristopherModeratorHi 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.
November 19, 2016 at 5:14 am #1263517
Missy SParticipantPlease clarify,
It is not possible to change the background color of all 50 posts within a category.
It must be done 50 individual times?
November 19, 2016 at 5:44 am #1263533
ChristopherModeratorHi 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.
November 19, 2016 at 5:47 am #1263536
Missy SParticipantThanks for the workaround. This is very helpful!
November 19, 2016 at 6:02 am #1263548
ChristopherModeratorYou’re welcome.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1263337 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
