I am working with an HTML code that contains 6 different div elements:
<div class="hisclass1 hisclass2 myclass hisclass3">
<div class="herclass1 herclass2"> <!-- 2nd div -->
</div>
</div>
<div class="hisclass1 hisclass2">
<div class="herclass1 herclass2">
</div>
</div>
<div class="hisclass2 hisclass3">
<div class="herclass1 herclass2 herclass3">
</div>
</div>
My goal is to adjust the height of only the second div using CSS.
I am trying to avoid using the long selector like
.hisclass1.hisclass2.myclass.hisclass3 herclass1.herclass2{}
because there are more than 20 classes in the first div's source code.
How can I change the height of the second div by targeting the myclass
, herclass1
, and herclass2
classes within it?