- This topic is empty.
July 26, 2017 at 7:30 am #257076gulliverParticipant
In a WordPress install, a query has last-of-type applied – and which works fine except when paginated.
My flawed thinking is that in addition to the entry which is genuinely last, pagination causes some preceding entries to also temporarily become last-of-type… as the final item on each page, and hence last-of-type will apply to whichever entry is last on each paginated page.
But it doesn’t, and is applied only to that which is genuinely last.July 26, 2017 at 9:35 am #257078BeverleyhParticipant
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”.
With hindsight, ‘only targeting the true last element regardless of which items are currently seen’ seems sensibly correct. I’m now wiser.
My knowledge of ‘developer console’ is tiny – so this is a good reason to learn more about it.
‘nth child’ could be the fix.
- The forum ‘CSS’ is closed to new topics and replies.