Link colors in Netscape

They have: 19 posts

Joined: Jan 2000

I'm new at this and looking for an answer to how to get CSS to work in NS. It works fine in IE5, but I lose my links in NS. The CSS looks like this:

a { font-size:10pt; color:white; text-decoration:none }
a:hover { color:99ccff; text-decoration:underline }
a.plain:hover { font-size:10pt; color:blue; text-decoration:underline }
a.plain { font-size:10pt trebuchet ms; color:black; text-decoration:underline }

In the links I want black text, I included "class=plain" in the a link. NS reads the top two "a" styles, but not the subclass styles. (a.plain:hover and a.plain) What am I doing wrong? Is there a way to make this work? I put the test page of this code at:
http://www.teampenning.net/testindex.html

If anyone could take a look and help me out, I'd really appreciate it. Thanks!

They have: 334 posts

Joined: Dec 1999

Try this:

a { font-size:10pt; color:white; text-decoration:none }
a:hover { color:99ccff; text-decoration:underline }
.plain A:hover { font-size:10pt; color:blue; text-decoration:underline }
.plain A:link { font-size:10pt trebuchet ms; color:black; text-decoration:underline }

They have: 334 posts

Joined: Dec 1999

One more thing that I missed on the 1st read.

Include the # in your colors when using a hex value instead of the color name, so:

a { font-size:10pt; color:white; text-decoration:none }
a:hover { color:#99ccff; text-decoration:underline }
.plain A:hover { font-size:10pt; color:blue; text-decoration:underline }
.plain A:link { font-size:10pt trebuchet ms; color:black; text-decoration:underline }

Oh, by the way, you might want to consider 2 other things:

.plain A:visited {your info here} if you want to make your visited links different from the virgin links

Netscape doesn't support hover, so don't expect that one to work no matter how you code it.

[This message has been edited by Maverick (edited 10 January 2000).]

They have: 19 posts

Joined: Jan 2000

I tried it with those changes, and it didn't work. In fact, it made the links white in IE also. Is there something I need to change in the <a href> tag to make it work? Thanks for your help!!

They have: 334 posts

Joined: Dec 1999

Well, first, check your coding. It's pretty sloppy and Netscape and IE handle errors differently. Something like:

{ font-size:10pt trebuchet ms; color:black; text-decoration:underline }

is wrong since you're calling a font face (trebuchet ms) without a proper font-family prefix.

so:

{ font-size:10pt; font-family:trebuchet ms; color:black; text-decoration:underline }

If that doesn't work, do it anyway since you should always practice good coding

Then, try this:

1) Enclose the links you want to be governed by the .plain class inside a
<P CLASS="plain">

</P> tag set and use the following:
a { font-size:10pt; color:white; text-decoration:none }
a:hover { color:99ccff; text-decoration:underline }
P.plain A:hover { font-size:10pt; color:blue; text-decoration:underline }
P.plain A:link { font-size:10pt; font-family:trebuchet ms; color:black; text-decoration:underline }

They have: 19 posts

Joined: Jan 2000

Well, I tried that and it gave me back the black links with the blue hover in IE, but in Netscape all the links in the paragraphs are still white. I can live without the hover in Netscape, but kind of wanted to have them in IE. As I don't know what else to do, the only thing I can think of is to forget the hover in the paragraphs and add font tags to the links to return it to black. Unless, you've more ideas? I'm willing to try!

PS. Thanks for the tip about the messy code. I'm just learning all this, and that's the way to learn, by people pointing out what's wrong!

They have: 19 posts

Joined: Jan 2000

What the heck? I don't know how this happened, but I put everything back as it was when I started, except making the corrections for the #(color) and the font-family, tried it again and it is working! I have black links in Netscape and IE, with the hover in IE too!

How does it figure? I had tried it with this same code changes before and it didn't work.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.