Without checking these links, I question the need for a PHP modification. CSS is very powerful; presuming that there is a logical division between each posting HTML wise, there is no reason why CSS cannot be used alone to change the rendering of these. Adding a class to the html will make it easier of course.
So in other words, I would suggest that this isn't a PHP issue, rather an HTML/CSS one. Is there anything in particular that I may be missing that indicates that this could be a PHP issue?
header('HTTP/1.1 420 Enhance Your Calm');