There is a universal CSS class which does this:
.inside-article {
background-color: #ffffff;
}
What I'd like to do is change the color to #393939 on a specific Post ID of 6238.
This doesn't seem to work:
.postid-6238 .inside-article {
background-color: #393939;
}
Am I doing something wrong here?
Thanks!
There is a universal CSS class which does this:
.inside-article {
background-color: #ffffff;
}
What I'd like to do is change the color to #393939 on a specific Post ID of 6238.
This doesn't seem to work:
.postid-6238 .inside-article {
background-color: #393939;
}
Am I doing something wrong here?
Thanks!
Share Improve this question asked Jan 31, 2020 at 16:19 HenryHenry 9831 gold badge8 silver badges31 bronze badges 1 |1 Answer
Reset to default 0This may not solve the problem necessary because there may be other rules in your theme that have higher specificity and will overrule your selectors but
You need to combine the selector together, like so:
.postid-6238.inside-article {
background-color: #393939;
}
That selector will choose for all elements that have BOTH the classes .postid-6238 and .inside-article in them.
If you have them separated:
I've seen themes that will assign an id to the post-id instead of a class
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744786511a4593659.html
!important
. – Vitauts Stočka Commented Jan 31, 2020 at 16:28