<body>
<h2>text</h2>
<ol>text</ol>
<p>text</p>
<h2>text</h2>
<img />
<p>text</p>
</body>
h2 ~ p:first-of-type{} will change only first p.
(h2 ~ p):first-of-type {} would change all p's (it's a 'reset') but css does not allow.
Instead, add class="h" to all H2s and
.h ~ p:first-of-type {} and this will change both p's.
no such thing as first-of-class either.
The other way to accomplish both p's being changed is to split the xhtml segment into two to isolate the H2s.
Shazam!
|