title: CSS Question-- Selecting Div Class Based on Its Child
body: <p>Sorry for a basic question. But, I need some help.</p>
  
  <p>In CSS, how can I select a div class only when it has a specific child? So, for example:</p>
  
  <pre><code>&lt;div class="specialClass"&gt;
     &lt;div id="myDiv"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Let's say I only want to change specialClass' background to red, if it has a child called myDiv. </p>
  
  <pre><code>what_selector? {
        background-color: #FF0000;
      }
  </code></pre>
  
  <p>Thank you.</p>
  
  <p>-Laxmidi</p>