title: nth-child css selector not working correctly if we had <br> tag in sibling of children elements
body: <p>a simple <code>&lt;div&gt;</code> with 5 <code>&lt;span&gt;</code> as children that end of any <code>&lt;span&gt;</code> i have <code>&lt;br&gt;</code> tag too.<br>
  when i want to select by <code>:nth-child(x)</code> any span element with index of more than 1 it's not worked<br>
  even selecting by <code>document.querySelector()</code> not worked<br>
  i test it on FireFox and Chrome too<br>
  when i removed <code>&lt;br&gt;</code> tags it's worked<br></p>
  <p>how it's possible ?<br></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-js lang-js prettyprint-override"><code>console.log("i have 5 span children as well : ", document.querySelectorAll(".div1&gt;span").length);
  
  console.log("second span child is null : ", document.querySelector(".div1&gt;span:nth-child(2)"));
  
  console.log("third span child is second span element : ", document.querySelector(".div1&gt;span:nth-child(3)").textContent);
  
  console.log("select second element by another way: ", document.querySelectorAll(".div1&gt;span")[1].textContent);
  
  console.log("tag name of second child: ", document.querySelector(".div1&gt;*:nth-child(2)").tagName);</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>html&gt;body&gt;div.div1&gt;span:nth-child(2) {
    color: blue;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
  
  &lt;body&gt;
    &lt;div class="div1"&gt;
      &lt;span&gt;this is example text 1&lt;/span&gt;
      &lt;br&gt;
      &lt;span&gt;this is example text 2&lt;/span&gt;
      &lt;br&gt;
      &lt;span&gt;this is example text 3&lt;/span&gt;
      &lt;br&gt;
      &lt;span&gt;this is example text 4&lt;/span&gt;
      &lt;br&gt;
      &lt;span&gt;this is example text 5&lt;/span&gt;
      &lt;br&gt;
    &lt;/div&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>