title: css last-child not working when adding divs of different classes
body: <p>I have some HTML that looks like this:</p>
  
  <pre><code>&lt;div class="SomeContainer"&gt;
      &lt;div class="MyClass"&gt;&lt;/div&gt;
      &lt;div class="MyClass"&gt;&lt;/div&gt;
      &lt;div class="MyClass"&gt;&lt;/div&gt;
      &lt;div class="MyOtherClass"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And I use the following CSS</p>
  
  <pre><code>.MyClass{...}
  .MyClass:last-child{box-shadow:0px 5px 10px black;}
  </code></pre>
  
  <p>I wrongly assumed that <code>last-child</code> operated on the last child of a certain class but it actually operates on the last-child of the container if it's of the same class.</p>
  
  <p>Is there some convenient way around? I know I could add a wrapper around the <code>MyClass</code> div and add the CSS for the shadow to the wrapper but I was wondering if there's a better way to do it.</p>
  
  <p>Thanks.</p>