Blog, Website & Page Publishing

annie100
Participant

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

SOLVE

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!

0 Upvotes
1 Accepted solution
Josh
Solution
Recognized Expert | Platinum Partner
Recognized Expert | Platinum Partner

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

SOLVE

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

HubSpot support and inbound marketing for OEMs, contract manufacturers, and industrial suppliers.
HubSpot Platinum Partner & HubSpot Certified Trainer

View solution in original post

3 Replies 3
Josh
Solution
Recognized Expert | Platinum Partner
Recognized Expert | Platinum Partner

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

SOLVE

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

HubSpot support and inbound marketing for OEMs, contract manufacturers, and industrial suppliers.
HubSpot Platinum Partner & HubSpot Certified Trainer

annie100
Participant

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

SOLVE

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

0 Upvotes
Josh
Recognized Expert | Platinum Partner
Recognized Expert | Platinum Partner

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

SOLVE

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




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

Josh Curcio

HubSpot support and inbound marketing for OEMs, contract manufacturers, and industrial suppliers.
HubSpot Platinum Partner & HubSpot Certified Trainer

0 Upvotes