Put simply, I am trying to target not only the last child in a parent div, but also the last item in a row that adjusts based on screen size. I have a row of 4 elements (divs) with borders on all but the last one using :last-child. However, when the screen size is reduced, the row becomes 2 rows of 2 divs each, requiring me to remove the right border from the second and last div in each row.
This request is similar to a question answered using :last-child (Remove border from last child css), but my situation adds the complexity of removing borders from specific children below a certain screen size.
Is there a way to accomplish this with CSS without resorting to a media query for such a small, specific case? Any input would be appreciated as I have searched for a solution without success.