Hi everyone,

I use the general selector to zero my paddings and margins. I then 
add in some defaults for common elements:

p, h1, h2, h3 {
      margin-top: 0.5em;
      margin-bottom: 0.5em;
}

...and then use adjacent sibling sel. to refine them, which works well:

p+h1, p+h2, p+h3 {
      margin-top: 1.5em;
}


Now I have a sidebar that I want to remove the default top margins of 
any heading elements on the very first line, so I hoped a rule like 
this would do the trick, but to no avail:

div#sidebar+h1, div#sidebar+h2, div#sidebar+h3 {
      margin-top: 0em;
}

Why does the rule not work?  Am I misunderstanding how these are 
supposed to work?

(Changing it to a descendant selector like   div#sidebar h1, etc. 
shows the desired effect, but sadly on other h selectors further 
down, too.)

Any help is very much appreciated!


Cheers  Martin
______________________________________________________________________
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