I have a function that specifically excludes a style on links by targeting their IDs. Each of my links has an ID, so I use that to exclude the style.
a:not([id='hopscotch_logo'] { color: red; }
Now, I also want to find links that are children of the specified ID. Here is an example of what I'm trying to achieve:
a:not([id='hopscotch_logo + a'] { color: red; }
Below is some dummy HTML for reference:
<li class="dropdown">
<a href="#" id="hopscotch_logo" class="dropdown-toggle" data-toggle="dropdown">Don't turn me red</a>
<ul class="dropdown-menu">
<li class="menu-item"><a href="/Tools/Home/ChangePassword.aspx">I don't want to be red either</a></li>
</ul>
</li>
I am open to changing the HTML structure or using another method, but I need to figure out the correct way to target this child element of my parent ID. Although the following attempt is incorrect, I believe it's close:
a:not([id='hopscotch_logo + a'] {color:red;}