> 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..
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
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
> /*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
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
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
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 > *
{