gorkreg
Member
Posted 1 month ago #
Is it possible to give different styles from my style.css to an specific static page? If I am in the page "Clients" I want the content of that post/page to be styled different to the other pages.
I tried with the id name of the post, for example:
#167 h2 {...}
But it doesn't work.
Any ideas?
If you are using the body_class() function and '#167' is referring to the page ID, try something like this:
.page-item-167 h2 {...}
gorkreg
Member
Posted 1 month ago #
Thanks cais! It's .page-id-167 instead of .page-item-167 but it works.
Yes, you are correct, gorkreg!
'post-item-167' would be from the post_class() function, my bad ... glad you sorted it out.