Click to See Complete Forum and Search --> : [RESOLVED] a:visited error


Wiz Creations
07-26-2006, 01:50 PM
For some reason on my site, the visited links have the same color as the static text, even though I have the a:visited set to a different color. Maybe I'm missing something because it's my work and I'm not able to see my error, so could another few sets of eyes try and see what's wrong?

My website: http://wizcreations.com
The css: http://wizcreations.com/script/design.css

Below is only the design that I think would have an affect on the links.body {
margin:10px auto;
background-image:url(../media/bgs/mainbg.jpg);
background-repeat:repeat-x;
background-color:#000000;
width:600px;
height:auto;
}

.txtbox a, a:link, a:visited, a:active {
color:#0000FF;
text-decoration:underline;
}

.txtbox a:hover {
color:#000000;
text-decoration:underline;
}

#container {
margin:0px auto;
background-image:url(../media/bgs/subbg.jpg);
padding-left:7px;
padding-right:7px;
padding-bottom:7px;
width:575px;
height:auto;
}

.txtbox {
margin-bottom:10px;
color:#002851;
height:auto;
}

.txtmid {
margin:0px;
padding-left:10px;
padding-right:10px;
padding-bottom:3px;
background-image:url(../media/bgs/txtmid.jpg);
background-repeat:repeat-y;
width:381px;
height:auto;
}

nataliemac
07-26-2006, 02:14 PM
You have to use the pseudo classes in the right order:

a:link
a:visited
a:hover
a:active

Just remember: Las Vegas Has Animals

Wiz Creations
07-26-2006, 03:27 PM
Ok, so I'm going to have to split it up as.txtbox a, a:link, a:visited {
color:#0000FF;
text-decoration:underline;
}

.txtbox a:hover {
color:#000000;
text-decoration:underline;
}

.txtbox a:active {
color:#0000FF;
text-decoration:underline;
}

instead of.txtbox a, a:link, a:visited, a:active {
color:#0000FF;
text-decoration:underline;
}

.txtbox a:hover {
color:#000000;
text-decoration:underline;
}

Right? Oh, and I don't really need the a in there because I have all 4 pseudo classes, correct?

sameer.net.in
07-26-2006, 04:06 PM
you can use

.txtbox a, .txtbox a:link, .txtbox a :visited, .txtbox a:active {
color:#0000FF;
text-decoration:underline;
}

Kor
07-26-2006, 04:20 PM
You have to use the pseudo classes in the right order:
a:link
a:visited
a:hover
a:active

yeap, the order top/bottom is important in CSS. As in HTML sometimes.
http://www.tizag.com/cssT/pclass.php
http://www.w3schools.com/css/css_pseudo_classes.asp