Prev | Current Page 151 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"

Element nodes
and non-empty text nodes are
considered to be children; empty text
nodes, comments, and processing
instructions don??™t count as children. A
text node is considered empty if it has
a data length of zero; so, for example, a
text node with a single space isn??™t
empty.
Compatibility
SPEC
CSS3
BROWSER SUPPORT
Op9.2 Saf3+ FF1+ IE7
NONE FULL BUGGY NONE
Example
The selector p:empty will match the first
paragraph, but not the second or third, in
this example:



Hello, World!


Opera Safari Firefox Internet Explorer
9.2 3.0 2.0 1.3 2.0 1.5 1.0 7.0 6.0 5.5
None Full Buggy Buggy Buggy Buggy Buggy None None None
In Firefox versions up to and including 2:
?–  The selector body:empty always matches the body element.
?–  The selector continues to match an element even after content has been added
dynamically.
In Safari versions up to and including 2, when it appears in an internal style sheet
(using