On Wed, Jul 8, 2009 at 3:20 PM, MEM<[email protected]> wrote:
>
> All h1 that are followed by a p will have a padding-bottom of X.
>
> Is this possible?


No, but you could apply the reverse:

h1 + p { padding-top: 3em; }

So instead of "any h1 that precedes a p" you're styling "any p that
immediately follows an h1." (Note, this doesn't work for IE6. And for
it to work properly in IE7, you'll want to make sure that you never
have a comment between the <h1> and the <p>. See
<http://reference.sitepoint.com/css/adjacentsiblingselector#compatibilitysection>
for more about this.)

Erik
______________________________________________________________________
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/

Reply via email to