Reputation: 3185
How can I target a link with _BLANK target but which doesn't have specific class?
a[target="_BLANK"] {
// Do something if this link isn't .skip-this class
}
Upvotes: 1
Views: 46
Reputation: 6894
Simply use the CSS :not
selector
CSS
a[target="_BLANK"]:not(.skip-this) {
color: red;
}
a[target="_BLANK"]:not(.skip-this) {
color: red;
}
<a href="" target="_BLANK" class="skip-this">Hello</a>
<a href="" target="_BLANK">Hello</a>
Upvotes: 3