View Single Post
Old 01-06-2016, 11:43 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,558
Karma: 19620479
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
I think :first-of-type is only CSS3 (and it would target the first <p>, provided it has a given class, not the "first p with a given class", I believe), so don't expect ePub 2 renderers to support it.

Maybe you can invert the selection. "p.attribution + p.attribution" would target the second and later of the series, which you could use to "cancel" the style you asign to "p.attribution".

But, the best is probably adding an additional class:

Code:
<p class="attribution first"> Harry Summers</p>
<p class="attribution">King of Heartland</p>
<p class="attribution">Companion to the Queen</p>
and then use "p.attribution.first"
Jellby is offline   Reply With Quote