Previous Message
Next Message

Re: [css-d] understanding contextual selectors

Sent by Bill Daly on 21 August 2002 21:09


--- shining monkey [EMAIL-REMOVED]> wrote:
> 8/21/2002 1:23:15 PM, "Timothy J. Luoma"
> [EMAIL-REMOVED]> wrote:
> 
> >	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?
> 

That wouldn't work.  That selector would select any h3
element within the <div id="vision"> and it would also
select any p element anywhere in the document.  The
comma is more of a convenience thing for taking
elements with the same css rules and only having to
write those rules once.  So basically, that rule would
be the same as writing

div#vision h3 {
...rules...
}

p {
...rules...
}

Bill Daly

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
Previous Message
Next Message

Message thread: