Re: [css-d] first-child pseudo-class not behaving as expected

2009-06-06 Thread Rob Emenecker
> You are way over my head, Rob. But given what you state is a > given case, then the solution may well lie within a problem > solving language-- programming? Hi David, Actually, if you see my other reply (to Tim Snadden). The way I had structured the selector was incorrect. The selector of..

Re: [css-d] first-child pseudo-class not behaving as expected

2009-06-05 Thread David Laakso
Rob Emenecker wrote: >> /*div#content:first-child > * { margin-top: 0; } delete >> ruleset*/ >> > > >> /*div#sidebar:first-child > * { margin-top: 0; >> }delete ruleset*/ >> > > >> p {border: 1px solid red;margin: 0 0 15px >> 0;}/*add ruleset*/ >> > > David, > > That work

Re: [css-d] first-child pseudo-class not behaving as expected

2009-06-05 Thread Rob Emenecker
Thanks Tim, > div#sidebar p:first-child { margin-top: 0; } Somehow, somewhere I misread the an explanation of the specification and got the placement of the [:first-child] pseudo-element incorrect. The following does work in IE7+ and FF3: div#sidebar > *:first-child {margin-top: 0;} div#content

Re: [css-d] first-child pseudo-class not behaving as expected

2009-06-05 Thread Rob Emenecker
> /*div#content:first-child > * { margin-top: 0; } delete > ruleset*/ > /*div#sidebar:first-child > * { margin-top: 0; > }delete ruleset*/ > p {border: 1px solid red;margin: 0 0 15px > 0;}/*add ruleset*/ David, That works in the one example, but the purpose of me setting these the way I d

Re: [css-d] first-child pseudo-class not behaving as expected

2009-06-05 Thread David Laakso
Rob Emenecker wrote: > Hi all, > > I am trying to use the first-child pseudo-class to set a zero top margin in > several content divs on a page. > div#sidebar:first-child > * > {margin-top: 0;} > > > http://new.pasadenabusinessassociation.com > > Any suggestions? > /*div#content:first-chi

Re: [css-d] first-child pseudo-class not behaving as expected

2009-06-05 Thread Tim Snadden
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 s

[css-d] first-child pseudo-class not behaving as expected

2009-06-05 Thread Rob Emenecker
Hi all, I am trying to use the first-child pseudo-class to set a zero top margin in several content divs on a page. The page works in IE7, but not FF3 -- kind of the opposite of what I would expect. In FF3 the sidebar has a single element in it, and a style of... div#sidebar:first-child > * {