Infinite scroll messing up nth:of-type

You’ve got to take the type in :nth-of-type() literally. It only takes into account the type of the element (in this case DIV). The selector doesn’t matter.

:nth-of-type() works the same, except that it only considers element of the given type.

http://quirksmode.org/css/selectors/nthchild.html

Unfortunately I can’t imagine there is a nice solution for the moment. Maybe you can hardcode #infscr-loading to be delivered as <p>. Then your existing code will work.