Thanks all. I finally decided to wrap the major groupings in a <div class="by-country"> wrapper, and set margin-bottom for the .by-country class.
Rick Gordon ------------------ On 8/30/10 at 10:25 PM +0200, Joergen W. Lang wrote in a message entitled "Re: [css-d] Adjacent Sibling Selectors in Reverse?": >If I understand your question correctly, something like the stuff below might >work for you. I used the following HTML, based on your example: > ><p>1st paragraph</p> ><p>2nd paragraph</p> ><h2>Some heading</h2> ><p>3rd paragraph</p> ><p>4th paragraph</p> ><p>5th paragraph</p> > >and this CSS: > >p { color: green; } >h2 + p, p + p { color: red; } > >The first p before the h2 gets green text. All others are red. Which selectors >are needed to style the elements after the h2 depends on your HTML. > >This is not very nice - but it works. The basic idea is to use a generic >selector for the special case and then override it with more specific >selectors for the other elements. > >The first rule targets all p elements. The second rule overrides this for > >a) p elements that directly follow a h2 element (3rd p) and >b) for all p elements that have another p element as an adjacent > sibling (2nd, 4th and 5th p). > >According to the current draft for CSS3 selectors there may be a :nth-of-type >selector which might be just the thing you're after. More on the new selectors >can be found here: > http://www.w3.org/TR/css3-selectors/#selectors > >hope this helps, > >Joergen -- ___________________________________________________ RICK GORDON EMERALD VALLEY GRAPHICS AND CONSULTING ___________________________________________________ WWW: http://www.shelterpub.com ______________________________________________________________________ css-discuss [cs...@lists.css-discuss.org] 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/