View Full Version : Cant get these anchors to change color! Arg!

08-14-2011, 04:38 PM
So I have a really convoluted site, css-wise, that I really need to clean up one o these days. It started out with editing an existing template, and then has been added to over the years, piecemeal, as I've added plugins and made changes to the site. The result is kind of a mess but it at least seems to display right.

Except for one thing. I want links that are in h1, h2, or h3 tags to be black, not the current brown color they're showing. I've tried several things but can't seem to get it to work. I've even put a class on the h3 tag itself and tried to turn it black but it just won't do it.

I never "learned" CSS officially, I've just picked it up along the way, so there are huge gaps in what I know.

Anyway, the site is here: http://opalcat.com/ all those links that are titles of articles should be black, but they're not.

Style sheet is here: http://opalcat.com/css.php?n=default (some of the stuff I tried is near the top in the links area, some is at the very very bottom)

Any help?

08-14-2011, 05:00 PM
Use following code:

h1 a, h2 a, h3 a {

color:#000 !important;
text-decoration:underline; /*you can change it to none if you don't want underline */


08-14-2011, 05:04 PM
In your css, if you change:

h1 a, h2 a, h3 a


#content h1 a, #content h2 a, #content h3 a

It should work.

Oops, now you have two options :)

08-14-2011, 06:40 PM
here's a few good reads on css specificity for some learning- t is probably one of the most confusing things about css for alot of folks.


Hey also you should try out firefox with the firebug plugin installed, it helps pinpoint problems liek these very quickly. see the links in my signature.

08-20-2011, 07:02 PM
Thanks everyone, I will try that stuff. Sorry for being so late to respond--I didn't realize this forum didn't automatically subscribe you to threads you posted in so I thought nobody had responded when I didn't get an email! Whoops! Changed my settings now.