title: "nth-last-child(1)" not targeting last element
body: <p>I am not fully understanding the behaviour of some css pseudo class selectors.</p>
  
  <p>Looking at this simple html template:</p>
  
  <pre><code> &lt;body&gt;
  
    &lt;div&gt;
     &lt;p&gt;One&lt;/p&gt;
     &lt;p&gt;Two&lt;/p&gt;
    &lt;/div&gt;
  
    &lt;div&gt;
     &lt;p&gt;Three&lt;/p&gt;
     &lt;p&gt;Four&lt;/p&gt;
    &lt;/div&gt;
  
    &lt;div&gt;
     &lt;p&gt;Five&lt;/p&gt;
     &lt;p&gt;Six&lt;/p&gt;
    &lt;/div&gt;
  
    &lt;div&gt;
     &lt;p&gt;Seven&lt;/p&gt;
     &lt;p&gt;Eight&lt;/p&gt;
    &lt;/div&gt;
  
   &lt;/body&gt;
  </code></pre>
  
  <p>I do not understand why the following css would actually apply the style to the first div:</p>
  
  <pre><code>div:nth-child(1){
   color: red;
  }
  </code></pre>
  
  <p>and the following css won't apply the style to the last div:</p>
  
  <pre><code>div:nth-last-child(1){
   color: red;
  }
  </code></pre>
  
  <p>As far as I understand the nth-child selector will find the target, look for his parent and select the nth-child corresponding to the target.</p>
  
  <p>Thanks for your help.</p>
  
  <p>Andrea</p>