I need help selecting the initial div block that contains the word "Target".
<div class="box-content">
<div>
<div>Target</div>
<div>xxxx</div>
<div>xxxx</div>
<div>xxxx</div>
<div>
<div>Unwanted</div>
<p>xxxx</p>
</div>
</div>
I attempted;
div.box-content div div:nth-child(1) {
display:none;
}
and
div.box-content div div:first-child {
display:none;
}
However, this removes the wrapping div of "Unwanted" as well. Is there a way to only target the initial one that wraps "Target"