Reputation: 5
I have the following code in my wordpress theme:
<div class="BlaBla">
<ul>
<li>
<a>stuff to select</a>
</li>
<li>
<a>stuff to NOT select</a>
</li>
<\ul>
</div>
i have to select the first "a" tag to remove it (add the rule display: none) but i can't put id's or classes
i tried the following rules but select every things
div[class="BlaBla"] ul li a:first-child{
display:none;
}
div[class="BlaBla"] ul li:first-child{
display:none;
}
div[class="BlaBla"] > ul > li:first-child{
display:none;
}
Upvotes: 0
Views: 414
Reputation: 123377
you need to target the link inside the first list-item
so the selector is
.BlaBla li:first-child a {
display: none;
}
About your attempted solutions:
Upvotes: 1