Forum:Advanced CSS selector ... is there such a thing ?

In either Common.css or Monaco.css ... Is it possible to construct a class selector that is "qualified" by being the child of some div#uniqueID that is a few levels higher up in the HTML element hierarchy?

Case in point is the HTML generated by the tags: div.wk_blogs_comments appears in output generate for both the panel/box format and the plain/article format. This target div element cannot have it's own unique ID (indeed there may be many such DIVs just as there may be many blog posts) however, a div element 3 or 4 levels higher up in the HTML hierarchy does have a "qualifying" ID. viz. div#wk_blogs_panel for panel/boxed output and div#wk_blogs_article for plain/article output.
 * I appreciate how jQuery can successfully distinguish between the two but I do not know how you can distinguish between the two in a skin_name.css file.

Some user in #wikia IRC claimed it can be done but they vanished before "delivering the know-how"

--najevi 16:21, November 12, 2009 (UTC)
 * Is it truth or myth?:my guess is that it's myth ... but I'd love to be proven wrong!


 * Unless I misunderstand you,  and   should do the trick. The CSS within the brackets will affect all divs with the class "wk_blogs_comments" which are inside the container called "wk_blogs_panel"/"wk_blogs_article". -- Porter21 (talk) 16:51, November 12, 2009 (UTC)

I love it when solutions turn out be as simple as this! Thank you, that did the trick very nicely indeed! That relationship among selectors was not obvious from my reading at w3schools Is it safe to assume that this logical-AND operation applies whenever selectors are separated by white space and that logical-OR applies when they are separated by the comma? --najevi 22:34, November 12, 2009 (UTC)