make the last element in. a repeat .for different css code example Example: apply css on last child in parent div .parent > *:last-child { background-color: red; }