Overriding CSS when an element is missing from the DOM
<p>If an element is missing from the DOM I'd like to add margin space, and if the element is there then I'd like there to be no margin space.
in CSS I have tried the following: </p>

<p>A - So if the H2 title is on the page then I’d like there to be no margin top:</p>

<pre><code>    #content &gt; article &gt; h2 &gt; div &gt; p:nth-child(1) {
        margin-top: 0;
    }
</code></pre>

<p>B - And if the H2 title is not there I’d like there to be margin top:</p>

<pre><code>    #content &gt; article &gt; div p:nth-child(1) {
        margin-top: 32px;
    }
</code></pre>

<p>Is there a way to order the configuration of the CSS so that one can override the other if the H2 is missing, or vice vera? </p>

<p>Thanks,</p>