View Full Version : CSS - A link
Richard
04-10-2003, 09:07 PM
This is the links part of my CSS file:
A.link2:visited { COLOR: #000000; TEXT-DECORATION: none }
A.link2:link { COLOR: #000000; TEXT-DECORATION: none }
A.link2:hover { COLOR: #9c9c9c; TEXT-DECORATION: none }
A.link2:active { COLOR: #9c9c9c; TEXT-DECORATION: none }
A.blink:visited { COLOR: #000000; TEXT-DECORATION: none }
A.blink:link { COLOR: #000000; TEXT-DECORATION: none }
A.blink:hover { COLOR: #000000; TEXT-DECORATION: none }
A.blink:active { COLOR: #000000; TEXT-DECORATION: none }
Links with: <a href="blah.php" class="link2"> are black and grey when moused over, but links with: <a href="blah2.php" target="_blank" class="blink"> aren't black and are the default blue.
:confused:
cg9com
04-10-2003, 09:48 PM
a:hover.blink {color:#000000;}
notice the order, :)
also, if you are going to use the same CSS implementation on all of the links, you can just add something like:
a {text-decoration:none;}
this will cover all the anchors without needing a psuedoclass (:hover etc.)
resulting in less text. :D :D
http://www.w3schools.com/css/ - a winner
pardicity3
04-10-2003, 10:39 PM
From: http://www.w3schools.com/css/css_pseudo_classes.asp
selector.class:pseudo-class {property: value}
I think he has it in the right order when he puts a.blink:hover. I am not sure what the problem may be, though I always have semi-colons [;] at the end of all declarations. I don't think this should make a difference, but try this:
A.link2:visited { COLOR: #000000; TEXT-DECORATION: none;}
A.link2:link { COLOR: #000000; TEXT-DECORATION: none;}
A.link2:hover { COLOR: #9c9c9c; TEXT-DECORATION: none;}
A.link2:active { COLOR: #9c9c9c; TEXT-DECORATION: none;}
A.blink:visited { COLOR: #000000; TEXT-DECORATION: none;}
A.blink:link { COLOR: #000000; TEXT-DECORATION: none;}
A.blink:hover { COLOR: #000000; TEXT-DECORATION: none;}
A.blink:active { COLOR: #000000; TEXT-DECORATION: none;}
cg9com
04-10-2003, 11:38 PM
thats what i get for trying to be smart :D when will this day end. I use a semicolon after every value, but i dont think it needs to be on the last one, at least it doesnt affect the CSS, its good practice though to always have them there.
Anyway i think maybe there is some other conflicting CSS or something? i dont see anything else that could be wrong.
PauletteB
04-11-2003, 03:36 AM
Maybe...
<span class="blink"><a href="blah2.php" target="_blank">Bla2</a><span>
Roy Sinclair
04-11-2003, 02:57 PM
I just pasted his declaration into a test web page and it works fine for me exactly as the original post has it.
The problem is not with the CSS, it must exist somewhere else, is it possible to see a link to the page?
Richard
04-11-2003, 07:50 PM
I found the problem.
There was nothing wrong with it at all. I check the my website online because it's php, and my ISP caches images and css files so it was still using the old version of the CSS.
I changed the name of the file and it worked.
:)
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.