title: I can not understand CSS: first-child
body: <p>I have problem with first-child selector. In code I have two div (this same class), img (in every) and p (in every). When i type in CSS .div-class:first-child {margin:10}, in the p a margin is added and only in first div.</p>
  
  <p>First ask: why margin was not added to img (first element in div)
  Second ask: why margin is added only first div (second have this same class name)</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;section class="section-offer"&gt;
  
      &lt;div class="section-offer-single"&gt;
          &lt;img src="images/pizza.png" alt="Pizza"&gt;
          &lt;p&gt;Some text&lt;/p&gt;
      &lt;/div&gt;
  
      &lt;div class="section-offer-single"&gt;
          &lt;img src="images/pizza.png" alt="Pizza"&gt;
          &lt;p&gt;Some text&lt;/p&gt;
      &lt;/div&gt;
  
  &lt;/section&gt;
  
  </code></pre>
  
  <pre class="lang-css prettyprint-override"><code>
  .section-offer-single:first-child{
    margin: 0px 0px 130px;
  }
  
  </code></pre>