title: Why is nth-child selector not working?
body: <p>I am using the <code>nth-child</code> selector to add background images for different social icons. However, all icons are appearing the same. What am I doing wrong?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.social-logo {
      display: inline-block;
      width: 24px;
      height: 24px;
      transition: background-image .2s;
  }
  
  #social-links div:nth-child(1) {
      background-image: url('https://mysql-raigovind93.c9users.io/Cally%20Dai//img/footer/logo-linkedin.svg');
  }
  
  #social-links div:nth-child(1):hover {
      background-image: url('https://mysql-raigovind93.c9users.io/Cally%20Dai//img/footer/logo-linkedin-copy.svg');
  }
  
  #social-links div:nth-child(2) {
      background-image: url('https://mysql-raigovind93.c9users.io/Cally%20Dai//img/footer/logo-dribbble.svg');
  }
  
  #social-links div:nth-child(2):hover {
      background-image: url('https://mysql-raigovind93.c9users.io/Cally%20Dai//img/footer/logo-dribbble-copy.svg');
  }
  
  #social-links div:nth-child(3) {
      background-image: url('https://mysql-raigovind93.c9users.io/Cally%20Dai//img/footer/logo-email.svg');
  }
  
  #social-links div:nth-child(3):hover {
      background-image: url('https://mysql-raigovind93.c9users.io/Cally%20Dai//img/footer/logo-email-copy.svg');
  }
  
  #social-links div:nth-child(4) {
      background-image: url('https://mysql-raigovind93.c9users.io/Cally%20Dai//img/footer/logo-insta.svg');
  }
  
  #social-links div:nth-child(4):hover {
      background-image: url('https://mysql-raigovind93.c9users.io/Cally%20Dai//img/footer/logo-insta-copy.svg');
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="social-links"&gt;
    &lt;a href=""&gt;&lt;div class="social-logo"&gt;&lt;/div&gt;&lt;/a&gt;
    &lt;a href=""&gt;&lt;div class="social-logo"&gt;&lt;/div&gt;&lt;/a&gt;
    &lt;a href=""&gt;&lt;div class="social-logo"&gt;&lt;/div&gt;&lt;/a&gt;
    &lt;a href=""&gt;&lt;div class="social-logo"&gt;&lt;/div&gt;&lt;/a&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>