The screenshot above displays a series of boxes that are printed on the screen. Each box is floated to the left and has a margin-right of 5px. However, I am facing an issue where after the third box, I need to remove the margin-right style. This pattern continues for every row of boxes in the container.
1 2 3
4 5 6
7 8 9
To achieve this layout, I must remove the margin-right for boxes 3, 6, 9, and so on. Although I am aware of the :lastchild:after selector, it only affects the last box in general. What I require is for this styling adjustment to be applied to every last box in each row. Your assistance with this matter would be greatly appreciated. Thank you.