title: CSS nth-child select all but last element when length is unknown
body: <p>UPDATE: The fiddle link I posted has the working code now. <code>:not(:last-child)</code> and <code>:nth-last-child(n + 2)</code> both work perfectly.</p>
  
  <p>I'm trying to use the <code>nth-child</code> or <code>nth-last-child</code> selector to select every <code>li</code> in a <code>ul</code> except for the last one. The catch is, the length of the list can vary from 1 to 5 elements. I haven't been able to find any documentation or examples of how to accomplish this.</p>
  
  <p>Here is the HTML for the <code>ul</code>:</p>
  
  <pre><code>&lt;ul class="breadcrumbs"&gt;
      &lt;li&gt;
          &lt;a href="/"&gt;Home&lt;/a&gt;
      &lt;/li&gt;
      &lt;li&gt;
          &lt;a href="/categories/1"&gt;Articles&lt;/a&gt;
      &lt;/li&gt;
      &lt;li&gt;
          &lt;a href="/categories/6"&gt;Specials&lt;/a&gt;
      &lt;/li&gt;
      &lt;li class="current"&gt;
          &lt;a href="/categories/6/articles/21"&gt;Song Lyrics&lt;/a&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Here is my current code:</p>
  
  <pre><code>ul &gt; li:nth-last-child(-1n+4) &gt; a:hover {
    color: red;
  }
  </code></pre>
  
  <p>This code still selects the last element in the list. I've also tried the code below, but that doesn't select anything. I tried a number of other combinations as well, but they either didn't work at all or selected the last element.</p>
  
  <pre><code>ul &gt; li:nth-child(1):nth-last-child(2) &gt; a:hover {
    color: red;
  }
  </code></pre>
  
  <p><a href="http://jsfiddle.net/z4q670cf/" rel="noreferrer">Here is a fiddle</a>.</p>