using the nth-of-type selector to target a class with the same name
using the nth-of-type css selector you can target a class with the same name, using a number.
I guess this can make your code a bit neater not having to add a sub class
HTML
<div class='my-class'>x</div>
<div class='my-class'>x</div>
<div class='my-class'>x</div>
CSS
.my-class {
background:#000;
height:100px;
width:100px;
}
.my-class:nth-of-type(2) {
background: #F00;
}
x
x
x