1

I have made a child theme of TwentyFifteen. Am trying to set on styles.css of the child theme a specific color on every page or post.

I tried somethin like that

.post-id-no.id .hentry,.site-footer {
background-color: #RGBColor !important;
}

But I didn't see any difference, its still white. What exactly am I doing wrong?

1 Answer 1

1

The CSS code syntax is not correct. For post and page specific CSS, you need to use something like this:

/* Replace x with post/page id and post with page and vice versa*/ 
.page-id-x .hentry, 
.page-id-x .entry-footer {
   background-color: #RGBColor !important;
}
9
  • Thnx for the quick answer, but it doesn't work :/
    – Alex
    Commented May 12, 2015 at 15:03
  • Give me your URL link.
    – m4n0
    Commented May 12, 2015 at 15:03
  • @Alex Did you replace x with your post id?
    – m4n0
    Commented May 12, 2015 at 15:12
  • It should be .page-id-35 .hentry I just added the code and it works. Where are you adding your CSS?
    – m4n0
    Commented May 12, 2015 at 15:29
  • on child css file
    – Alex
    Commented May 12, 2015 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.