Links Not Colored?

WhiteOut

New Member
Messages
111
Reaction score
0
Points
0
For some reason, not all of my links are white. I know, I used css to change them, but its not working for some links. If I do not include http://, its not white also. Like if I put <a href="pagename.html">Page Name</a>, its just the default color. Also, a link to a website called MapleFBI is the default color on my website. Here take a look at my css and html for that part:


Code:
a:link {
color:white;
text-decoration:none;
}

a:visted {
color:white;
text-decoration:none;
}

a:active {
color:white;
text-decoration:none;
}

a:hover {
color:brown;
text-decoration:none;
}

.affiliate {
background:grey;
padding:10px;
margin:20px;
position:absolute;
top:600px;
width:200px;
height:200px;

}

Code:
<div class="affiliate">
<img src="http://forums.x10hosting.com/images/affiliates.png">
<li><a href="http://vhost4all.com/">vhost4all</a>
<li><a href="http://maplefbi.com">MapleFBI</a>
</div>


Can someone tell me what Im doing wrong?
 
Last edited:

swantonbomb88

New Member
Messages
66
Reaction score
0
Points
0
instead of using "white" and "grey" and "brown" use:
#000000 for White
#999999 for Grey
#663300 for Brown

DONT FORGET TO INCLUDE THE #!!
so example:
Code:
a:link {
color:#000000;
text-decoration:none;
}

a:visted {
color:#000000;
text-decoration:none;
}

a:active {
color:#000000;
text-decoration:none;
}

a:hover {
color:#663300;
text-decoration:none;
}

.affiliate {
background:#999999;
padding:10px;
margin:20px;
position:absolute;
top:600px;
width:200px;
height:200px;

}

hope i helped you out, and hope it works
 
Last edited:

TechAsh

Retired
Messages
5,853
Reaction score
7
Points
38
@swantonbomb88 - Using names for colours shouldn't make a difference (Although it is always best to use the hex codes.)

@WhiteOut - Have you tried using a different browser, it could be one of the browser's setting stopping it from working. Also could you provide a link to a page where we can see this problem.
 

WhiteOut

New Member
Messages
111
Reaction score
0
Points
0
I cant try it in a different browser because I dont know where to get another browser that works with my operating system (Im using Ubuntu). Right now Im using firefox.

You can look at it if you want. For me, the only link that isnt white is the one that says MapleFBI. Heres the link: http://whiteout.vhost4free.com/
 

WhiteOut

New Member
Messages
111
Reaction score
0
Points
0
I just looked at it on my PSP and the MapleFBI link is messed up on that too. Why is it doing that?
 

TechAsh

Retired
Messages
5,853
Reaction score
7
Points
38
All your links are white when I view your site.

EDIT: Looking round a bit more I've found that the visited colour for the links don't work. (When the user has been to that website and come back the link changes colour).

EDIT: I've found the problem!
a:visted {
color:#FFFFFF;
text-decoration:none;
}
You've spelt visited wrong. (Just add the extra 'i' and everything should work.)
 
Last edited:

WhiteOut

New Member
Messages
111
Reaction score
0
Points
0
You've spelt visited wrong. (Just add the extra 'i' and everything should work.)
Wow.. I feel stupid. Thanks for telling me about my typo =]
 

StephenCronin

New Member
Messages
6
Reaction score
0
Points
0
Okay, I know this is resolved, but a couple of points that may help other people in future:

You can validate CSS at the W3C CSS Validation Service. Running the validator on the original code above returns the following errors:

6 Unknown pseudo-element or pseudo-class :visted
17 a:hover Value Error : color brown is not a color value : brown
22 .affiliate Value Error : background Too many values or values are not recognized : grey

This picks up the spelling error and a couple of others (I think grey should be the American spelling gray). As TechAsh says it's better to use hex codes for colours.

Quote from WhiteOut:
I cant try it in a different browser because I dont know where to get another browser that works with my operating system (Im using Ubuntu). Right now Im using firefox.

You could always try browsershots.org to get screenshots of your site in different browsers. Not ideal (I'd rather have different browsers installed locally), but an option if you can't install another browser. By the way, I don't use Ubuntu, but I'm pretty sure Opera works on it.

Anyway, hope this helps someone in future.
 
Top