Previous Message
Next Message

Re: [css-d] understanding contextual selectors

Sent by John Stoneham on 21 August 2002 20:08


> >	div#vision h3 p
>
> I was wondering, could he have used:
> 	div#vision h3,p
> To make this work?  Or does that say something else?

Remember that a comma starts the -entire selector- over. What this one
says is equivalent to

div#vision h3 {
   blah;
}

p {
  blah;
}

You'd need to use

div#vision h3, div#vision p {
  blah;
}

to make it work the way he wants - the way you've mentioned above will
apply to h3 tags inside a div#vision, and ALL p tags in the entire
document.

- John Stoneham
Previous Message
Next Message

Message thread: