> >Something like this perhaps?
> >h2+p {
> >
> >}
>
> But that affects p tags that fall AFTER h2's, not before, no?
>
Yes, that's correct. I don't think there's a way to do this without Javascript.
What about styling the h2 instead of the p? I don't know what your use case
is, but if, for example, you wanted extra bottom margin on the last paragraph
in the section, you could put extra top-margin on the h2 instead.
Perhaps something like:
h2 {margin-top: 2em}
h2:first-of-type {margin-top: 1em} /* makes the margin smaller for the first h2
on the page */
---Tim
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/