title: Css Selector for elements with a specific class and parent
body: <p>I want to style an element if it has a specific class and parent element.
  If i use <code>caption &gt; h1</code> it works perfectly, but a soon as I add my class <code>.sub</code> it doesn't work anymore.</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;caption&gt;
      &lt;h1 class="sub"&gt;Text&lt;/h1&gt;
  &lt;/caption&gt;   
  </code></pre>
  
  <p><strong>CSS:</strong></p>
  
  <p><strong><em>works:</em></strong></p>
  
  <pre><code>caption &gt; h1 {
      font-weight: 500;
      color: #777;
      font-family: sans-serif;
  }
  </code></pre>
  
  <p><strong><em>doesn't work:</em></strong></p>
  
  <pre><code>.sub caption &gt; h1 {
      font-weight: 500;
      color: #777;
      font-family: sans-serif;
  }
  </code></pre>
  
  <p>How is it possible to select elements with a specific <code>parent</code> and <code>class</code>?</p>