...

View Full Version : defining more than link colour using css?



KevinG
10-16-2002, 10:44 PM
i can't define more than one link colour in my global css file. i've tried everything! below is my attempt -


a.white:hover { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 7.5pt; font-style: normal; font-weight: bold; color: #FFFFFF; text-decoration: underline}
a.white:visited { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 7.5pt; font-style: normal; font-weight: bold; color: #FFFFFF}
a.white { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 7.5pt; font-style: normal; font-weight: bold; color: #FFFFFF; text-decoration: none}

a.red { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; font-style: normal; font-weight: bold; color: #990000}
a.red:hover { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; font-style: normal; font-weight: bold; color: #990000; text-decoration: underline}
a.red:visited { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; font-style: normal; font-weight: bold; color: #990000}


i was sure the above styles would work but noooooooo!

i'm using DW3 and when i make a new style my CSS selector tool says my new styles are unavailable!

any ideas anyone?

(P.S kinda re posted in the appropiate forum)

MCookie
10-16-2002, 11:07 PM
Well, your CSS does work for me..

<a class="red" href="">red link</a><br>
<a class="white" href="">white link</a>

ACJavascript
10-16-2002, 11:34 PM
try this.

#Link1 A {text-decoration:none;color:blue;}
#Link2 A {text-decoration:none;color:red;}

____

<a class="Link1"><a href="Bla">Bla</a></a>
<a class="Link2"><a href="Bla2">Bla2</a></a>


This works for me.. :D

Nightfire
10-16-2002, 11:57 PM
Isn't #'s meant for ID's?

#blah{bladeblah}

<a href="" id=blah>blahdeblahblah</a>

ACJavascript
10-17-2002, 12:21 AM
I gues,, both ways work fine for me:D

KevinG
10-17-2002, 12:50 AM
but when i make those styles in my global style sheet DW says "red unavailable" "white unavailable" in my css tool?

dauvm
10-17-2002, 01:01 AM
maybe you have already defined them?
notepad! ;)

KevinG
10-17-2002, 01:08 AM
update.

i managed to make more than one colour BUT it only makes my links change to that colour - it doesn't make them appear without underline and on click underline. i made three styles link, hover and visited - but my links just appear underlined regardlous.

KevinG
10-17-2002, 01:27 AM
its 1.30am

i fixed the above problem only my white links underline on mouseover, but my red links don't - even though i followed the same procedure to m ake each style set. :mad:

Pooh
10-17-2002, 01:37 AM
You have to sequence them in a particular order or they will not work:


a.white:link
a.white:visited
a.white:hover
a.white:active

ronaldb66
10-17-2002, 12:30 PM
Kevin,

although it has yielded valuable info (forgot about the specific order, sorry), this is considered cross-posting and is not appreciated.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum