Search code examples
cssclassrel

How to change style to a class from a rel attribute CSS


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 =)


Solution

  • Now you can try to this

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