Archived topic
How to change link text color on homepage
7 replies · Started by Jonny on April 11, 2023
Hello,
How can I change the link text color on a specific block design I have on my homepage and also the link color in the footer of my site?
Currently the link text is Black and I would like to change it to White.
I don't want this to affect the link color in my content site-wide, only this specific block that I have created for the destinations under the Heading "Choose Your Destination" There are 8 cover images with text overlay for each continent/country.
TIA!
Hi Jonny,
Give the Container Block or the Grid Block holding the links a class of change-link-colors.
Adding Custom Classes: https://wordpress.com/support/wordpress-editor/adding-additional-css-classes-to-blocks/
Then, add this through Appearance > Customize > Additional CSS:
.change-link-colors p a{
color: #fff !important;
}
Thanks Fernando, that worked for the Container Block. How can I apply this to the link color for the items in my Footer with out affecting link colours in my content site-wide?
The same class should work. Just add it to the Container Block on your Footer.
OK thanks, that worked!
Is it also possible to disable the light blue underline class from the footer and also the block container on the home page without affecting the links I have in my content?
This is the CSS that I have added to display the light blue color on my links:
p a {
color: #222222 !important;
background: linear-gradient(180deg,rgba(255,255,255,0) 65%,#BFE1E1 65%);
border-bottom: none !important;
}
Try updating the code I provided to this:
.change-link-colors p a{
color: #fff !important;
background: none;
}
great that worked, thanks very much Fernando!
You're welcome, Jonny!