&:not(:last-child) { margin-right: 20px; } Oh my gosh. I had no idea you could do something like this in CSS. I am so far behind the times.