If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / How can I change link colors in header, without changing all other link colors?

How can I change link colors in header, without changing all other link colors?

Started by coreyalderin on 18 Jun 2012, 12:03 AM · Views: 1,674

Results 1 to 10 of 10
18 Jun 2012, 12:03 AM
#1
coreyalderin avatar

coreyalderin

Zen Follower

Join Date:
May 2012
Posts:
137
Plugin Contributions:
0

Post #1 by coreyalderin

I changed the stylesheet so that the EZ Pages header text color is white, but then it changes the color of all the links on my site to white. Then when I have a white background I do not see the links.

Is there something I can add into the stylsheet so that I can change the colors of link independently?

Thanks
Site: http://www.toolsforchrist.com/shop

18 Jun 2012, 1:04 AM
#2
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,822
Plugin Contributions:
24

Post #2 by balihr

At the very top of your stylesheet.css, you have the following:

a:link, #navEZPagesTOC ul li a {
	color: #ffffff;
	text-decoration: none;
	}

 
a:visited {
	color: #ffffff;
	text-decoration: none;
	}

As you can see, you've set all links on your site to white (#ffffff). Change that and you'll see your links... But, you might consider changing the way you're building your site - you have a white background and A LOT of white text in your stylesheet - Google's very likely gonna penalize you for that...

My site - Pro ZC Help
My portfolio | My plugins

18 Jun 2012, 1:12 AM
#3
coreyalderin avatar

coreyalderin

Zen Follower

Join Date:
May 2012
Posts:
137
Plugin Contributions:
0

Post #3 by coreyalderin

Thanks for the response. Do I have white text somehwere besides the links? I really do not want to get penalized by Google.

I changed the above code to black (#000000), but then something else happens that I dont want. The EZ pages header then changes the text to black. I want those to be white for a:link and a:visted.

Can I change just the EZ pages text.

Thanks again

18 Jun 2012, 10:08 AM
#4
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Post #4 by keneso

Add this to your stylesheet

#navEZPagesTop a {
color: #ffffff;
}

And if you need the hover add this, and set the color you want

#navEZPagesTop a:hover {
color: #f90310;
}

18 Jun 2012, 3:43 PM
#5
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,822
Plugin Contributions:
24

Post #5 by balihr

coreyalderin:

Thanks for the response. Do I have white text somehwere besides the links? I really do not want to get penalized by Google.
I don't know because I haven't checked your site in details and I see it's still in progress. This is something I noticed in your stylesheet.css - just check it and see how many things are set to #FFF and all on white background.

The other question I believe was answered by keneso. :wink:

My site - Pro ZC Help
My portfolio | My plugins

19 Jun 2012, 2:03 AM
#6
coreyalderin avatar

coreyalderin

Zen Follower

Join Date:
May 2012
Posts:
137
Plugin Contributions:
0

Post #6 by coreyalderin

Thanks for the responses. I have changed the #navEZPagesTop in all places to be what I want but for some reason it is not working. Most of the text is white like I want it but one of the words is black. Then when I hover over them nothing happens. I cannot figure this out.

19 Jun 2012, 9:22 AM
#7
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Post #7 by keneso

Well you didn't quite follow the suggestions.

In your stylesheet you don't have

#navEZPagesTop a {
color: #ffffff;
}

Do this please:
add this to your stylesheet

#navEZPagesTop a {
 color: #ffffff;
 }

find

a:hover, #navEZPagesTop a:hover {
 color: #000000;
 }

and change to

a:hover {
 color: #000000;
 }
#navEZPagesTop a:hover {
 color: #whatever-color-you-want;
 }

if you want to change the color of the link once it has been visited change the color here

#navEZPagesTop a:visited {
 color: #ffffff;
 }
19 Jun 2012, 11:19 AM
#8
coreyalderin avatar

coreyalderin

Zen Follower

Join Date:
May 2012
Posts:
137
Plugin Contributions:
0

Post #8 by coreyalderin

Thank you, that worked. I didn't mean not to follow the directions. I had originally put it as suggested but then when it didnt work I was messing around with it some more. I think part of this issue was also the code I had for "visited". I did not need that and then when I deleted it (along with the other suggestes) it worked.

Thanks again for all the help.

One last thing: Is there a somewhere I can go that explains what all the stylesheet #...'s do? And also explains all the #....'s that are not currently in the stylesheet but can be added to do more customizing. I do not know all the terminology so sorry if the questios are confusing.

19 Jun 2012, 11:39 AM
#9
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Post #9 by keneso

Best thing you can do is to use firefox with firebug, and/or web developer extensions, with those you can inspect, and edit/test all the css real-time.
If you see an id (#) or class (.) in the styelsheet you can add it, and style it.
You can also create your own id, and/or class to control even more the layout, of course in that case you need to add it both on the outputting file, and the stylesheet.
If you need more info on css w3schools.com is a good place to start.

20 Jun 2012, 2:17 AM
#10
coreyalderin avatar

coreyalderin

Zen Follower

Join Date:
May 2012
Posts:
137
Plugin Contributions:
0

Post #10 by coreyalderin

Thanks for all the help. I downloaded Firebug and that is exactly what I needed. Its a very helpful way to learn what everything does.