TwentyFifteen: How can it show a different color on every post page?
-
02-10-2020 - |
Pergunta
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?
Solução
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;
}
Licenciado em: CC-BY-SA com atribuição
Não afiliado a wordpress.stackexchange