Reputation: 1167
I have two different "layers" (What's the correct terminology???) of ul
s and I want to select the a
tags which are only within first one.
<div>
<ul>
<li>
<a>Here's what I'm trying to apply a certain style to</a>
<ul>
<li>
<a>Here's what I'm not trying to apply that certain style to</a>
</li>
</ul>
</li>
</ul>
</div>
So I know I can't just do div ul li a
because that would include the inner a
tags.
Upvotes: 0
Views: 57
Reputation: 943142
You need to:
Such:
div > ul > li > a
Upvotes: 3