Is there a way in css to select second last child?
css, css-selectors, jquery
Solution
Under the conditions specified, applying `class` (or `id`) to the second last element is only option.
Problem
Need to ensure browser compatibility as well (should work in IE8) I came across - :nth-last-child(2) But it is not browser compatible as it is a css3 selector. Also I came across a tip to get 2nd, 3rd, 4th child as - td:first-child + td + td But no way of reversing like td:last-child - td to get second last child. I don't want to use jquery. Is applying class to the second last element is only option ?