I
I
Ivan2020-04-28 19:08:14
css
Ivan, 2020-04-28 19:08:14

Why doesn't a[rel="external"] style work in CSS?

Hello everyone! I added a property to CSS but for some reason it doesn't work. It's not about the cache, and it's not about another style interrupting it. It's like it doesn't even apply.

Tell me where to dig?

Here is the link code

<div class="fsa">
<div class="text">
<p>
<a href="#" target="_blank" rel="noopener external noreferrer">Google Chrome</a>
</p>
</div>
</div>

and here is the style
.fsa .text a[rel="external"] {background:red}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lynn "Coffee Man", 2020-04-28
@skapunker

Because a[rel~="external"]
Dig towards documentation https://developer.mozilla.org/en/docs/Web/CSS/Attr...

I
Igor, 2020-04-28
@loonny

Don't dig anywhere. You stated like this , but rel is not equal to external. rel has an external, but it's not the only one there. Here, read about attribute selectors and you will understand your mistake. The article is small. .fsa .text a[rel="external"]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question