Want to change one link color without changing them throughout my site.

SOLVE
Highlighted
New Contributor

I have blue links throughout my blog, but in the footer it is on a blue background so I want it to be white in the footer without changing all the links to white. I tried building a custom class but that didnt work.

 

Here is a preview is my blog:

https://blog.centraldatastorage.com


.whitelink{ {% set linkColor2 = "#fff" % !important;}}

a {
color: {{ linkColor2 }};
text-decoration: none;
}

 

Any help would be great thanks!

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Regular Advisor | Gold Partner | HubSpot Certified Trainer

Hi @annie100,

 

Try adding a specific css reference to the div that the specific link lives in. 

 

.hhs-contact-con a:link {color: #fff !important}

.hhs-contact-con a:hover {color: #4bc860;}

 

This would be added to your CSS file, lower in the page than the first reference to the link color.

 

That's probably what I would try first.

 

Josh




Did this post help solve your problem? If so, please mark it as a solution.

Josh Curcio

We help tier 1 & 2 manufacturers generate leads!
HubSpot Gold Partner & HubSpot Certified Trainer

3 Replies 3
Regular Advisor | Gold Partner | HubSpot Certified Trainer

Hi @annie100,

 

Try adding a specific css reference to the div that the specific link lives in. 

 

.hhs-contact-con a:link {color: #fff !important}

.hhs-contact-con a:hover {color: #4bc860;}

 

This would be added to your CSS file, lower in the page than the first reference to the link color.

 

That's probably what I would try first.

 

Josh




Did this post help solve your problem? If so, please mark it as a solution.

Josh Curcio

We help tier 1 & 2 manufacturers generate leads!
HubSpot Gold Partner & HubSpot Certified Trainer

New Contributor

Josh, Thank you so much. That worked, you are truly amazing!

Reply
0 Upvotes
Regular Advisor | Gold Partner | HubSpot Certified Trainer

Thanks for the update, I'm happy it worked! When you can, please mark it as an accepted solution. Smiley Happy




Did this post help solve your problem? If so, please mark it as a solution.

Josh Curcio

We help tier 1 & 2 manufacturers generate leads!
HubSpot Gold Partner & HubSpot Certified Trainer

Reply
0 Upvotes