...

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



OpalCat
08-14-2011, 03: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?

vikram1vicky
08-14-2011, 04: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 */

}

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


h1 a, h2 a, h3 a


to:


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


It should work.
Dave

Oops, now you have two options :)

DanInMa
08-14-2011, 05: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.

http://coding.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/
http://css-tricks.com/855-specifics-on-css-specificity/
http://www.htmldog.com/guides/cssadvanced/specificity/

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.

OpalCat
08-20-2011, 06: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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum