title: Select the last 3 child elements
body: <p>I know you can select the last child with <code>:last-child</code> or a certain child with <code>:nth-child</code> (if you know their position/number).</p>
  
  <p>What I need is to select the last 3 children without knowing how many child elements there could be. </p>
  
  <p>I know there is something that's called <code>:nth-last-child</code>  but I cant really understand how it is working.</p>
  
  <p>For this:</p>
  
  <pre><code>&lt;div id="something"&gt;
  
      &lt;a href="images/x.jpg"  &gt;&lt;a/&gt;
      &lt;a href="images/x.jpg"  &gt;&lt;a/&gt;
      &lt;!-- More elements here --&gt;
      &lt;!-- ..... --&gt;
      &lt;!-- I need to select these: --&gt;
      &lt;a href="images/x.jpg"  &gt;&lt;a/&gt;
      &lt;a href="images/x.jpg"  &gt;&lt;a/&gt;
      &lt;a href="images/x.jpg"  &gt;&lt;a/&gt;
  
  &lt;/div&gt; 
  </code></pre>
  
  <p>I need something like this:</p>
  
  <pre><code>#something a:last-child{
     /* only now it selects the last &lt;a&gt; and the 2 &lt;a&gt;'s that come before*/ 
  }
  </code></pre>