Site logo

Archived topic

hyperlink colour in the post

11 replies · Started by Sanu Kumar on October 9, 2020

Viewing posts 1–12 of 12

Can I change the hyperlink colour inside the post - would like to change into gradient colour this
background: linear-gradient(150deg, rgba(193,10,255,1) 0%, rgba(240,2,255,1) 100%);

Hi there,

Try this:

.inside-article a {
    background: linear-gradient(150deg, rgba(193,10,255,1) 0%, rgba(240,2,255,1) 100%);
}

I am trying this CSS to change the link colour but doesn't change

body:not(.blog):not(.archieve) .inside-article > *:not(.rank-math-breadcrumb) a {
    font-weight: bold;
	 color: linear-gradient(150deg, rgba(193,10,255,1) 0%, rgba(240,2,255,1) 100%);
}

Can you try Tom's code first? If that doesn't work, can you link us to the page in question with the code added?

I tried Tom's code but it changed the link background but I want to change the font colour and I also try to replace background to color but not worked.

Hi there,

The code Tom provided can only be applied to a background color - are you wanting a gradient color for your text ?

yes

Not sure about this or the browser compatibility but try this:

body:not(.blog):not(.archive) .inside-article>*:not(.rank-math-breadcrumb) a {
    font-weight: bold;
    background: -webkit-linear-gradient(150deg, rgba(193,10,255,1) 0%, rgba(240,2,255,1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

not worked.

I think it should work because if we can change the hyperlink background colour then it is also possible to change the text colour of hyperlink.

I am not a techy guy, just my thoughts.

Can you share a link with the CSS added ?

It does work - try adding the CSS here to the top of your CSS.

This archived topic is closed to new replies.