Link to home
Start Free TrialLog in
Avatar of wordswithfriends
wordswithfriends

asked on

Why are my links black?

I find CSS very confusing.  Can you please tell me what to change to make my links a more traditional blue

http://wordswithfriends.net/?page_id=1779
Avatar of rawinnlnx9
rawinnlnx9
Flag of United States of America image

Somewhere you have a CSS class that has this definition:

a
{
    color: #000;
}

Open in new window

Replace with:

a
{
    color: #9dd334;
}

Open in new window


Don't forget to set attributes for visited forms and such.
Avatar of jello024
jello024

It looks like
#sidebar a
in
style.css
is changing the link color. you can remove that or change the color value.
To see what is going on. Navigate to the URL you provided and in IE7 or IE8 press F12. In the new window click on the mouse pointer at the far left. Now ALT+TAB back to your URL and mouse over the link and click it. Then go back to the F12 window and it will show you the class that has defined the attributes of your a tag. When I view it IE tells me that "style.css" is what is setting your a attributes.
Avatar of wordswithfriends

ASKER

rawinnlnx9, it's not just a, I have sidebar a, footer a etc and I don't know which one to choose

jello024, it's not sidebar a which is currently 3c3c3c.

I know it's some type of a but I can't figure out which one
rawinnlnx9, good tip.  I've tried modifying content a but this changes both the heading and the body.  I wish to change only the body
Avatar of Chris Stanyon
Line 156 of your style.css file contains the following:

#content a {
      color: #000;
}

If you want to set the links to their default colours, simply remove these lines. If you want to set another colour, change it.


I've tried that but it changes both my heading and content colors.  I just want the content anchor changed but the heading to remain black
OK, Sorry. Didn't notice that. It's because your heading is also a link (not sure if this is want you want.)

You could either remove the link from the header, or change the rule in your CSS to style only links within H2.

Change line 156 so that it only styles the H2 links
Instead of
     #content a { color:#000000; }

set it to
     #content h2 a { color: #000000; }

Open in new window

That works but there are a few other undesired secondary effects e.g. "Older Posts" turns blue I would like it to stay black.  There must be some piece of code that affects just the links I want because those links are underlined and the others are not.

Would it be possible to find the CSS that is responsible for underlining and then modify that so that only the within post links are affected?  The
ASKER CERTIFIED SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial