Thread: CSS selectors
View Single Post
Old 02-06-2019, 04:48 AM   #4
BobC
Guru
BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.
 
Posts: 691
Karma: 3026110
Join Date: Dec 2008
Location: Lancashire, U.K.
Device: BeBook 1, BeBook Pure, Kobo Glo, (and HD),Energy Sistem EReader Pro +
@Doitsu

The not pseudo class seems to be what I was after, however with its limited support I doubt if I will be using it.

@RbnJrg
I don't think your solution would work, the second paragraph isn't a "child" of the first, it's just a successor and would be selected by P + P. In any case with the limited support I wouldn't want to use it.

It's not a big problem anyway - I was just looking for a lazy way to catch some exceptions to the general rule. I'll continue with my original method where I need to invert the logic and specify the classes for the initial p using something like :

Code:
p {
text-indent : 2em;
}

p.class1 + p, p.class2 + p, p.class3 + p {
text-indent : 0;
}
Thanks for the ideas, I wondered if I was missing something obvious.

BobC
BobC is offline   Reply With Quote