I\'ve got a a bunch of DIV elements in my HTML, several of which have their class attribute set to \"rowsLayout\". Some of these rowsLayout DIVs can be nested inside one an
Why not use :empty?
JQuery Empty
EDIT: It also works as a CSS Selector:
:empty { background-color: black; }
MORE EDITS:
:last-of-type
almost works, but it gets 'a' for some reason. See my fiddle.
http://jsfiddle.net/DUdVR/3/
Depending on the number of divs you have you could either do something like:
div#b.rowsLayout,div#d.rowsLayout,div#e.rowsLayout {}
Maybe there is a better way to solve your problem, what are you trying to apply to all these divs?