I'm making a Wordpress website, and I have a question. Can I change CSS of certain elements with PHP DOM? I don't want to change structure of HTML, just few styles if certain conditions are met.
For example, if no images are present in my post I would like to add change color of the links in that post.
I'm thinking doing that with jQuery since it sounds a lot simpler, but I'm just wondering is this a valid way to do, or should I use PHP DOM?