title: Apply style to parent div based on child div using css
body: <p>I need to apply the style for parent div tag based on child class. 
  In the below code class(jqx-grid-group-expand) contains in the first position so parent tag(row0grid) display text color is red. In second(jqx-grid-group-expand) contains in the second position of the parent tag (row1grid) disply the text color is blue. I need to apply the style only in css. no need jQuery. Please help me. Am so trouble of this style. No need jQuery or other styles. because this coding is part of my grid code. grid controls have expand and collapse operation. </p>
  
  <p>Please Help me. I need the style in css only.</p>
  
  <pre><code> &lt;div style="width: 100%; float: left; display: block;" role="row" id="row0grid"&gt;
      &lt;div class=" jqx-grid-group-cell jqx-grid-cell-pinned jqx-grid-group-expand jqx-icon-arrow-down"&gt;
      &lt;/div&gt;
      &lt;div class=" jqx-grid-group-cell"&gt;
      &lt;/div&gt;
      &lt;div class=" jqx-grid-group-cell"&gt;
          Department: Dept1&lt;/div&gt;
      &lt;div class=" jqx-grid-group-cell"&gt;
      &lt;/div&gt;
      &lt;div class=" jqx-grid-group-cell"&gt;
          99&lt;/div&gt;
      &lt;div class=" jqx-grid-group-cell" title=""&gt;
          135.6&lt;/div&gt;
  &lt;/div&gt;
  &lt;div style="width: 100%; float: left; display: block;" id="row1grid"&gt;
      &lt;div class=" jqx-grid-group-cell"&gt;
      &lt;/div&gt;
      &lt;div class=" jqx-grid-group-cell jqx-grid-cell-pinned jqx-grid-group-expand jqx-icon-arrow-down"&gt;
      &lt;/div&gt;
      &lt;div class=" jqx-grid-group-cell"&gt;
          Department: Dept1&lt;/div&gt;
      &lt;div role="gridcell" class=" jqx-grid-group-cell"&gt;
      &lt;/div&gt;
      &lt;div class=" jqx-grid-group-cell"&gt;
          99&lt;/div&gt;
      &lt;div class=" jqx-grid-group-cell" title=""&gt;
          135.6&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>