jquerycssanchor

Styling a link based on its href


I have a 3rd party link on my website which I want to style. but it don't have any class or id which I can target. Only thing it have is its unique href value. Is it possible to style a anchor tag based on its href value.


Solution

  • You can use href css selector to style a tag based on link:

    a[href="your url here"]{
        background:red;
    }
    

    Demo