Let me start by saying I am a CSS newb. I am using wordpress and my post heading (h2) is displaying the color of the links on the page. I would like to keep all h2 headings black while all other links would be red. When changing the link color in the css, it also displays the post heading red as well.
How can I override this? I am sure this is something simple.
Thanks in advance for any help.
You need to show some HTML to get a definitive answer, but to colour all links in h2s green:
If your
h2
s have a certain class, you can drill it down to that specific class:Replace ‘#color’ with your hex digit.
You may have to put
!important
after the color if something else is overriding or if its done in the wrong place.maybe something like this can help you.
/* link color */
/* link color on hover(Mouseover) */