October 26, 2024
Chicago 12, Melborne City, USA
CSS

Select second last element with css


The CSS selector nth-of-type can be a number, an equation or odd/even. Is it possible to select nth from end instead of nth from the beginning?

I’m using a plugin to modify webpages I visit. There’s a varying number of menu items depending on circumstances, but the item I want to remove is always 2nd from the bottom.

I’m not sure where to begin, just wondering if it’s possible.



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video