...

View Full Version : keeping the color white although it is clicked



joonstar
08-14-2005, 01:31 AM
<style>
a:link {text-decoration:none; font-size:13px; font-weight:100; color:9595ff}
a:visited {text-decoration:none; font-size:13px; font-weight:100; color:black}
a:hover {text-decoration:underline; color:ff0000}

a.blue_box{
display:inline-block;
background-color:00ccff;
border: 1px solid 000000;
color:white;
}
</style>

<a href='test.html' class='blue_box'>test</a>

I designated the color of test in the blue box link white.
But after I once click the link, it becomes black.

How can I keep it white without changing of visited color "black" although it is clicked?

Lerura
08-14-2005, 01:42 AM
add this somewhere below a:visited:

a.blue_box:visited{color:white}

the reason it changing to black is that the only :visited the sheet have says that all visited anchors should be black

JamieR
08-14-2005, 01:42 AM
As a start off, use the hex for colours on all colour specifications - like #000 is black.

harbingerOTV
08-14-2005, 01:43 AM
try:



a.blue_box:visited{
display:inline-block;
background-color:00ccff;
border: 1px solid 000000;
color:#000;
}



a:visited:.blue_box{
display:inline-block;
background-color:00ccff;
border: 1px solid 000000;
color:#000;
}


one should work but can't rember the order of them. :o

he he change my #000 to #fff
man I'm off tonight

Lerura
08-14-2005, 01:46 AM
it doesn't matter cause css support all the color names


and when specifying you must always order it:
tag.nameOfTag:state

JamieR
08-14-2005, 01:52 AM
it doesn't matter cause css support all the color names

yes, but I prefer using the hex as it's more widely used I find.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum