A: 

Use the :empty pseudo to do the trick, e.g. to select ALL elements with no children (including no text nodes... nothing):

*:empty
Delan Azabani
A: 

I don't think this can be done with CSS alone. You would have to loop through all elements testing for a false return on hasChildNodes(). It would be sloppy and not something I would recommend.

Brook Julias
+1  A: 

As a text node is also a node for CSS you cannot do it with any CSS selector. Doing it with JavaScript you should first select all nodes with only one child and than test if it is only a text node.

Kau-Boy