Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The :nth-last-col()
CSS pseudo-class is designed for tables and grids. It accepts the An+B notation such as used with the :nth-child
selector, using this to target every nth column before it, therefore counting back from the end of the set of columns. The values odd and even are also valid.
/* Selects every odd column in a table */ :nth-last-col(odd) { background-color: pink; }