Hi Philip,
On 23/05/07, Philip Taylor (Webmaster) <P.Taylor@rhul.ac.uk> wrote:
>
>
>
> Mark Birbeck wrote:
>
> > So, say we make all div's blue:
> >
> > div { background-color: blue; }
> >
> > We've done two things; the first is to define a rule that creates a
> > collection of elements,
>
> No. The collection was pre-existing. Had you chosen to
> write "div.whatever {background-color: blue} then I would
> have agreed with you, but not using the code you cite.
I'll try to clarify what I was getting at, since the key point is not
what selector you use, but that _any_ selector is creating a notional
collection.
A document has all sorts of nodes, at all sorts of different levels of
the hierarchy. The CSS selectors can be seen as creating dynamic
collections of sub-sets of those nodes--"dynamic" because if you add
or remove a node from the DOM, it will be reflected in the 'nodeset'
or 'collection' that the styling is applied to. Since my rule selects
all div's at any level of the hierarchy, then it's creating a notional
collection ready to be operated on.
Regards,
Mark
--
Mark Birbeck, formsPlayer
mark.birbeck@x-port.net | +44 (0) 20 7689 9232
http://www.formsPlayer.com | http://internet-apps.blogspot.com
standards. innovation.