title: How do I style a div but only if it has an H1 as its first child?
body: <p>Is there a way that I can add <code>text-align:center</code> to all <code>div.wpb_wrapper</code> which have <code>h1</code> as the first child? One of the reasons I need this is that there are multiple <code>div.wpb_wrapper</code> that have the same parent, but not all have <code>&lt;h1&gt;</code> as the first child.</p>
  
  <p>In the example below I only want to style the second div.</p>
  
  <pre><code>&lt;div class="wpb_wrapper"&gt;
     &lt;h2&gt;Other text&lt;/h2&gt;
     &lt;p&gt;Other text&lt;/p&gt;   
  &lt;/div&gt;
  &lt;div class="wpb_wrapper"&gt;
     &lt;h1&gt;Text&lt;/h1&gt;
     &lt;h2&gt;Other text&lt;/h2&gt;
     &lt;p&gt;Other text&lt;/p&gt;   
  &lt;/div&gt;
  </code></pre>
  
  <p>EDIT:  I can't apply <code>text-align center</code> to h1 because it is has <code>display: inline-block;</code> already applied. That's why I need to style the parent.</p>