Question

i'm working on woocommerce and I'm looking for a way to stytle a class from a rel attribute.

I've manage to change the rel attribute by:

a .tagged_as[rel~=tag]{
    color: red !important;
}

But it change all the tag rel, I'm looking how to change only one span class (tagged_as) of rel attribute.

(from this html code:)

<span class="tagged_as">Tags: <a href="#" rel="tag">Grenache</a>, <a href="#" rel="tag">Syrah</a>.</span>

if anybody can highlite me, will be wonderfull, thank you in advance =)

Was it helpful?

Solution

Now you can try to this

.tagged_as a[rel~=tag]{
    color: red;
}

OTHER TIPS

You will have to give the a tag the class not the span

<span>Tags: <a class="tagged_as" href="#" rel="tag">Grenache</a>, <a href="#" rel="tag">Syrah</a>.</span>

Then your CSS should be ...

a.tagged_as[rel~=tag]{
 color: red !important;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top