Thread: CSS selectors
View Single Post
Old 02-04-2019, 03:32 PM   #1
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 +
CSS selectors

I'm looking to find a way of using a css selector with some unusual parameters.

I'm familiar with using a selector such as

Code:
p + p {
text-indent: 2em;
}
or
Code:
p.class1 + p {
text-align : right;
}
however what I'm looking for is one which will only select the second <p> where the first one has no class declared; i.e it won't select in the case of say

Code:
<p class="caption"> blah, blah, blah </p>
<p> some more text </p>
Or any other "classed" <p> tag.

I'm not sure if this is possible - has anyone found a way of doing this.

BobC
BobC is offline   Reply With Quote