I have some default styles set up to always float an image when its
inside of a <p>, like so:

p img       { float: left; margin: 1.5em 1.5em 1.5em 0; padding: 0; }

I want to have a selector that zeros the top margin IF the <img> is
immediate child of the <p>, with no paragraph text between them.

Currently I just use:

p img.top       { margin-top: 0; }

...But I'm trying to figure this out without manually having to place
the class on there with a more advanced selector.  It seems like I
need an 'adjacent child' selector, but it doesn't seem to exist. Any
ideas?
______________________________________________________________________
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