Header is displaying link color

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.

Read More

Thanks in advance for any help.

Related posts

Leave a Reply

3 comments

  1. You need to show some HTML to get a definitive answer, but to colour all links in h2s green:

    h2 a { color: green }
    

    If your h2s have a certain class, you can drill it down to that specific class:

    h2.classname a { color: green }
    
  2. Replace ‘#color’ with your hex digit.

    h2 a { color: #color }
    

    You may have to put !important after the color if something else is overriding or if its done in the wrong place.

  3. maybe something like this can help you.

    /* link color */

    h2 a, h2 a:visited
    {
        color:#f0f0f0 !important;
    }
    

    /* link color on hover(Mouseover) */

    h2 a:hover
    {
        color:#000000 !important;
    }