Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS When is last-of-type not so? Reply To: When is last-of-type not so?

#257078
Beverleyh
Participant

If pagination is built on the fly, on the client-side, it’s likely that ALL the elements are being loaded from the start and just 1-10 and 11-20 etc., are made visible when the appropriate “page” is viewed, so last-of-type is only targeting the true last element regardless of which items are currently seen in the visible “page”.

There may be an additional class being added to the last item in each “page” via JavaScript – check in the developer console to see if this is that case. Alternatively, try nth-child in CSS https://css-tricks.com/how-nth-child-works/