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.
Please Help me. I need the style in css only.
<div style="width: 100%; float: left; display: block;" role="row" id="row0grid">
<div class=" jqx-grid-group-cell jqx-grid-cell-pinned jqx-grid-group-expand jqx-icon-arrow-down">
</div>
<div class=" jqx-grid-group-cell">
</div>
<div class=" jqx-grid-group-cell">
Department: Dept1</div>
<div class=" jqx-grid-group-cell">
</div>
<div class=" jqx-grid-group-cell">
99</div>
<div class=" jqx-grid-group-cell" title="">
135.6</div>
</div>
<div style="width: 100%; float: left; display: block;" id="row1grid">
<div class=" jqx-grid-group-cell">
</div>
<div class=" jqx-grid-group-cell jqx-grid-cell-pinned jqx-grid-group-expand jqx-icon-arrow-down">
</div>
<div class=" jqx-grid-group-cell">
Department: Dept1</div>
<div role="gridcell" class=" jqx-grid-group-cell">
</div>
<div class=" jqx-grid-group-cell">
99</div>
<div class=" jqx-grid-group-cell" title="">
135.6</div>
</div>