On Mon, Jul 18, 2011 at 02:41:44PM +0100, Chris G wrote:
Then you should get something close to what you're looking for (subject to tweaking numbers, natch). The "+" in "h1 + p" tells the layout engine that that particular style should apply only to adjacent siblings of a particular parent. At this level, all these elements are siblings of "body", but only the first para after an h1 is adjacent to i1, as is only the first list after any paragraph.
Brilliant, I didn't know about that '+' syntax in CSS and it's *exactly* what I need. Thank you! :-)
... and it's done now, really simple too, much neater than any of the horrible bodges I'd previously tried. Plus it works everywhere with no need to do anything particular in the 'source' (i.e. the wiki that generates the HTML).
That sibling syntax is something I may well find other uses for too as I often find that indentation for example wants to be different according to what precedes something.
Ta! :-)