November 17, 2010 at 2:10 pm #74788
Great question! And, I don’t really think so, not with :nth-child or CSS anything anyway.
With jQuery, I’d go something like:
var $collection = $("li");
var numberOfThem = $collection.length;
var nextToLast = $collection[numberOfThem - 1];
so nextToLast is a DOM node of the next to last list item.