To select the last 3 element of the div
div:nth-last-child(3) { background: #000000; }
The syntax of pseudo-elements:
selector::pseudo-element { property:value; }
Change every third element's style
.home-activity .recent-activity-item:nth-child(3n+3) { margin-right: 0; }