tags:

views:

27

answers:

3

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.

+2  A: 

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.

Kerry
+4  A: 

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 }
Pekka
That did it. Thanks!!
adcmarti
A: 

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;
}
Chris Schroeder