On 6/06/2009, at 8:56 AM, Rob Emenecker wrote:
>
> div#sidebar:first-child > *
> {margin-top: 0;}
Hi Rob - you apply the :first-child pseudo class to the element you
want to target, not the parent whose child you want to target. e.g.
div#sidebar p:first-child { margin-top: 0; }
However, for simplicity's sake, and to make it work in our old CSS
nemesis Internet Explorer, have you considered just removing the top
margin off all <p> elements and setting the bottom margin to what you
want it to be?
I believe there was a thread about this recently about how IE treats
margins. I'm not sure if it's relevant here, but
<http://css-class.com/test/bugs/ie/haslayout-margins.htm
>
You may find you have better luck using on of the many css reset files
out there just to get everything on a more even keel before you apply
your own rules explicitly.
Cheers, 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/