title: how does the "nth-child" work?
body: <p>I am currently learning HTML/CSS and have a difficulty. My HTML is :</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>header
  {
      display: flex;
  }
  
  header:nth-child(1)
  {
      flex: 1;
      background: white;
  }
  
  header:nth-child(2)
  {
      flex: 2;
      background: black;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;header&gt;
      &lt;div id = "Titre Principal"&gt;
          &lt;img src = "images/zozor_logo.png" alt = "Logo de Zozor"/&gt;
          &lt;h1 class = "zouz"&gt; Zozor &lt;/h1&gt;
          &lt;h2 class = "hoodie"&gt; Carnets de voyage &lt;/h2&gt;
      &lt;/div&gt;
      &lt;nav&gt;
          &lt;ul class = "hoodie"&gt;
              &lt;li&gt;&lt;a href = "#"&gt; ACCUEIL &lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href = "#"&gt; BLOG &lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href = "#"&gt; CV &lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href = "#"&gt; CONTACT &lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/nav&gt;
  &lt;/header&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The problem is that I get this <a href="https://i.stack.imgur.com/U8BA5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U8BA5.png" alt="enter image description here"></a> 
  instead of this <a href="https://i.stack.imgur.com/W7u8E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W7u8E.png" alt="enter image description here"></a></p>
  
  <p>What is going wrong ? What theoretical did I missed ?</p>