<div class="wrap">
  <p class="description"><span class="underline">:nth-child(-n + 9)</span> - Allows us to target every sibling in a group starting from the 9th spot and working backwards</p>
  <ul class="example">
    <li>Item</li>  
    <li>Item</li>  
    <li>Item</li>  
    <li>Item</li>  
    <li>Item</li>  
    <li>Item</li>  
    <li>Item</li>  
    <li>Item</li>  
    <li>Item</li>  
    <li>Item</li>  
    <li>Item</li>  
    <li>Item</li>  
    <li>Item</li>  
    <li>Item</li>  
    <li>Item</li>  
  </ul>
</div>
/* Setup Code */
.wrap {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: 'Quicksand', sans-serif;
  font-size: 14px;
  line-height: 1.75em;
  color: #595959;
}

.description,
.example {
  max-width: 500px;
}

.example {
  margin-top: 20px;
  padding: 20px 30px 25px;
  background: #f5f5f5;
  display: inline-block;
  columns: 3;
}

.underline {
  text-decoration: underline;
}
/* End Setup */

/* Relevant Code */
li:nth-child(-n + 9) {
  color: red;
}
/* End Relevant */

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.