styling links within a class except the last one

76

<div class="outer">
  <a href="#">First</a>
  <a href="#">Second</a>
  <div>
    <a href="#">Third</a>
  </div>
  <a href="#">Fourth</a>
  <a href="#">Fifth</a>
</div>
.outer a:not(:last-of-type) {
  color: red;
}

Comments

Submit
0 Comments