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...
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 p
element in it, and a style of...
div#sidebar:first-child *
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-child * {
/*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
did was
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
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 works in the one example, but