PDA

View Full Version : Color of link with CSS/NS4


micko
07-04-2002, 08:52 AM
How can I change the color of a link with using CSS and NS4

since activated etc. doesn't work

A.footer:link {font-size: 10px; text-decoration: none; color: #FFFFFF; font-family: verdana, helvetica, arial;}
A.footer:active {font-size: 10px; text-decoration: none; color: #FFFFFF; font-family: verdana, helvetica, arial;}
A.footer:visited {font-size: 10px; text-decoration: none; color: #FFFFFF; font-family: verdana, helvetica, arial;}

premshree
07-04-2002, 09:06 AM
NS4 does not support CSS completely. So I am not sure whether you can really changecolor of links using CSS for NS4.

RiiWeN
07-04-2002, 09:12 AM
Try this;

<style type="text/css">
<!--
a:link { font-family: Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF; text-decoration: none}
a:visited { font-family: Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF; text-decoration: none}
a:hover { font-family: Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF; text-decoration: none}
a:active { font-family: Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF; text-decoration: none}
-->
</style>

-RiiWeN

micko
07-04-2002, 09:23 AM
Originally posted by RiiWeN
Try this;

<style type="text/css">
<!--
a:link { font-family: Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF; text-decoration: none}
a:visited { font-family: Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF; text-decoration: none}
a:hover { font-family: Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF; text-decoration: none}
a:active { font-family: Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF; text-decoration: none}
-->
</style>

-RiiWeN

Nope, this doesn't work

RiiWeN
07-04-2002, 09:27 AM
Alright!
But it works in Opera 6.0 and Ie 4.0+
Hmm...
*Hate NS* :)

-RiiWeN

Guardian23
07-04-2002, 09:35 AM
I don't know if HTML is acceptable, but try this:

<BODY ALINK="ACTIVELINKCOLOR" VLINK="VISITEDLINKCOLOR" LINK="LINKCOLOR">
<STYLE>
<!--
a:hover{
font-family: Verdana, Arial, Helvetica, sans-serif;
text-color: COLOR;
}
a{
font-family: Verdana, Arial, Helvetica, sans-serif; // is this line actually necessary?
text-decoration: none;
}
-->
</STYLE>
//could't think of anything for hover in HTML

Alternatively, you could use IDs and JavaScript to handle the onmouseover, onclick, onmouseout, onblur events for the links, but that could get messy, and I don't know if that works for NS4...

Sorry if I wasn't any help.

Guardian

PS: which part of your CSS isn't being processed? :confused:

RiiWeN
07-04-2002, 04:18 PM
That didn't work to me...:(

-RiiWeN

La Gal
07-05-2002, 06:08 AM
Netscape 4 does not support the a:hover or a:active pseudo classes.

Gordo
07-05-2002, 08:40 AM
I'm not 100% sure about this, but I'm pretty sure such CSS styles need to be in a particular order (or you'll have problems).

They should be (in order):
link
visited
hover
active



Now, if you're wanting to change the color onmouseover in the Netscape 4.x browser, you'll need to take a good look at RoyW's handly little script. It's the only one like it that I've ever seen...and I use it on a couple of web sites.

LOOK HERE! -- http://www.javascript-fx.com/others/index.html (see "Netscape Hover").