Archived topic
How to have H2 that links to a content table with different text colour
8 replies · Started by Graeme on January 24, 2023
Hi,
I've written a couple of blogs and I've set the linked words/content table links to the article in an orange colour but it also makes the H2 text orange in my article. I want the text to be black but I can't seem to work out how to change the text on these headers only and keep the link text colour orange.
I've left a couple of examples in the private information section.
Hi there,
Have you considered using the Headline block from GB since you are already using GB in the site?
https://docs.generateblocks.com/article/headline-overview/
Then you can set whatever color you want:
https://docs.generateblocks.com/article/headline-overview/#colors
Let me know :)
They are H2's already. I've tried setting the color of the text for the H2 to black but they still remain orange?
Is there any other advise?
To confirm the above I'm already using the headline block and when I go to change the colour to black for the H2's they just remain orange? I think this is because I have a table of contents that link to the headers?
Try this CSS:
.entry-content h2 :is(a,a:hover,a:active) {
color: black;
text-decoration: none;
}
Where should I add that? In the block's 'ADDITIONAL CSS CLASS(ES)' field? I tried that and nothing changed.
I also then tried the code editor but I didn't know where to place that?
You can add CSS code to customizer > additional CSS :)
Thanks - that resolved it!
No Problem :)