title: Apply css if element exists using CSS selector
body: <p>I have header in such a way that I would like to hide my image and span's in my pheader div if "banner" exists. Is there a quick way to do this using CSS selectors? Below is the HTML code.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;header&gt;
    &lt;div id="banner"&gt;
      &lt;!-- main content --&gt;
    &lt;/div&gt;
    &lt;div class="pheader"&gt;
      &lt;div class="user-panel"&gt;
        &lt;div id="hey-user" class="d2c-user-panel"&gt;
          &lt;img src="../images/defaultHeadshot_lg.png" class="userimg"&gt;
          &lt;!-- Hide This --&gt;
          &lt;span class="caret" id="down-arrow"&gt;&lt;/span&gt;
          &lt;span class="hey-user d2c-header-username"&gt;&lt;b&gt;Hello&lt;/span&gt;
        &lt;/div&gt;
  &lt;/header&gt;</code></pre>
  </div>
  </div>
  </p>