[thelist] CSS2 Child selectors in IE5/Win

Denis, David DDenis at inlumen.com
Tue Apr 10 10:44:26 CDT 2001


> can someone explain the difference between a "descendant 
> selector" and a
> "child selector"
> I understand descandants to be BODY TABLE TR TD P etc... (which works
> pretty much across the board)
> And child selector to be BODY > TABLE etc.. (which apparently does
> not...)

http://www.w3.org/TR/REC-CSS2/selector.html#descendant-selectors
http://www.w3.org/TR/REC-CSS2/selector.html#child-selectors

Child selectors are those that are direct descendants of parent elements.
Descendant selectors match those that are contained by another element, no
matter how deep within the tree.  This is why document structure is so
important, but that's another discussion entirely.

Dave




More information about the thelist mailing list