I don’t want to load another stylesheet, I just want to change the width, maybe add a margin and change the color on my index.php on the posts that don’t have pictures in them.
For me, simplest way would be to check with jQuery and if not, then add the appropriate CSS.
My question is: is this the right way to do, or should I use PHP? It seems a lot simpler and faster to do with a jQuery since I’m not changing the structure of HTML file.
I would seriously need more information about this, so any help would be appreciated.
I don’t know how simple it is:
$attr = $element->setAttributeNode(new DOMAttr('style', 'border:1px solid black;'));
With jQuery it would be a whole lot simpler, since I don’t have to use PHP DOM. I’m just wondering what’s the best, and the correct way to do it.