:not()

.nav-tab { // instead of putting it on border-right: 1px solid #424242; &:last-child { border-right: 0; // and then taking it off } // use CSS not() to only apply to the elements you want &:not(:last-child) { border-right: 1px solid #424242; } }

2 Responses

I use this a lot, but it's one of those things just not in my brain yet, and I find myself Googling it every time, ha! Now it's here. Thanks.
@Greg Smith :) You're welcome!

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.