title: How to select the last of the class
body: <p>I would like to select the last one from li.selected
  but the utopian selector </p>
  
  <pre><code>.selected:last-of-type {
    background: hotpink;
  }
  </code></pre>
  
  <p>doesn't work at all.</p>
  
  <pre><code>&lt;ul&gt;
    &lt;li class="selected"&gt;un&lt;/li&gt;
    &lt;li class="selected"&gt;deux&lt;/li&gt;
    &lt;li class="selected"&gt; ---- I want select that one ----- &lt;/li&gt;
    &lt;li class="foo"&gt;quatre&lt;/li&gt;
    &lt;li&gt;cinq&lt;/li&gt;
    &lt;li class="tang"&gt;six&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>I cannot use the following selector</p>
  
  <pre><code>.selected:nth-child(3) {
    background: hotpink;
  }
  </code></pre>
  
  <p>because it's for a dynamic application so,
  How can I proceed only with css selectors?</p>
  
  <p>Thank you in advance ;)</p>