How do I apply class to img element that is under a element
<p>I have this piece code:</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>.someclass &gt; img {
  width: 143px;
  height: 143px;
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="someclass"&gt;
  &lt;img src="http://i.imgur.com/wT188Qs.jpg"&gt;
  &lt;a href="#"&gt;
    &lt;img src="http://i.imgur.com/wT188Qs.jpg"&gt;
  &lt;/a&gt;</code></pre>
</div>
</div>
</p>

<p>First image gets resized to 143px, but the second one does not. I thought that all img elements under someclass would get styled, but it seems if there is another element between them then they don't get styled.</p>

<p>What css can I write to get it working?</p>

<p><a href="https://jsfiddle.net/8h0sh5jf/" rel="nofollow">https://jsfiddle.net/8h0sh5jf/</a></p>