Yeah, whitespace makes a textNode so an element containing any nodes can't be :empty. Also gotta watch out for those whitespace-only extra nodes when counting the children of an element with JavaScript, it often returns more children than you think at first ;)