I need to create a class that only applies to the holder-left inside the holder, and not to the one outside the holder.
<div class="holder">
<div class="holder-left">
</div>
<div class="holder-right">
</div>
</div>
<div class="holder-left">
</div>
div.holder {
margin: 10px 10px 0 10px;
width: 1002px;
}
How can I do that?
With a child selector:
Or a descendant selector:
The child selector will match
.holder-leftelements that are direct children ofdiv.holderelements. The descendant selector will match.holder-leftelements that are descendants (they could be grandchildren, for example) ofdiv.holderelements.