Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-14-2011, 03:38 PM   PM User | #1
OpalCat
New Coder

 
Join Date: Aug 2011
Posts: 82
Thanks: 2
Thanked 0 Times in 0 Posts
OpalCat is an unknown quantity at this point
Question Cant get these anchors to change color! Arg!

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?
OpalCat is offline   Reply With Quote
Old 08-14-2011, 04:00 PM   PM User | #2
vikram1vicky
Regular Coder

 
Join Date: Jul 2011
Location: India
Posts: 496
Thanks: 3
Thanked 57 Times in 56 Posts
vikram1vicky is an unknown quantity at this point
Use following code:
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 */

}
vikram1vicky is offline   Reply With Quote
Old 08-14-2011, 04:04 PM   PM User | #3
tracknut
Regular Coder

 
Join Date: Aug 2006
Posts: 906
Thanks: 4
Thanked 212 Times in 211 Posts
tracknut is an unknown quantity at this point
In your css, if you change:
Code:
h1 a, h2 a, h3 a
to:
Code:
#content h1 a, #content h2 a, #content h3 a
It should work.
Dave

Oops, now you have two options
tracknut is offline   Reply With Quote
Old 08-14-2011, 05:40 PM   PM User | #4
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,335
Thanks: 13
Thanked 207 Times in 207 Posts
DanInMa is on a distinguished road
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/2...u-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.
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is offline   Reply With Quote
Old 08-20-2011, 06:02 PM   PM User | #5
OpalCat
New Coder

 
Join Date: Aug 2011
Posts: 82
Thanks: 2
Thanked 0 Times in 0 Posts
OpalCat is an unknown quantity at this point
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.
OpalCat is offline   Reply With Quote
Reply

Bookmarks

Tags
color, css

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:40 AM.


Advertisement
Log in to turn off these ads.