Click to See Complete Forum and Search --> : Very simple CSS Netscape/Mozilla Question....


cis
12-09-2002, 02:19 PM
I am building a web page and at the bottom, I'm using CSS to override the default link colors. Basically I want them to all look white. It works fine in IE but not Netscape - the link colors (standard blue - purple) still appear as is.

In the <head> tag I have:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.78 [en] (Win98; U) [Netscape]">
<title>College Transit</title>
<style type="text/css">

.white10ptarial{
font-weight: bold;
font-size: -1;
color: white;
font-family: Arial,Helectiva;
text-decoration: none
}

And in the actual text I have <a class="white10ptarial" href="blah blah blah"....

Like I said displays fine in IE but not Netscape. Any ideas?

Zach Elfers
12-09-2002, 02:31 PM
Try a.white10ptarial: property {
}

where propertry is link, hover, active, visited.

cis
12-09-2002, 02:40 PM
Huhh?

:confused:

Zach Elfers
12-09-2002, 02:43 PM
I guess that letter combo makes a smiley. I'll fix that.

cis
12-09-2002, 02:50 PM
Didn't work.

I tried:

.white10ptarial:property{
font-weight: bold;
font-size: -1;
color: white;
font-family: Arial,Helectiva;
text-decoration: none
}

And it works in neither Netscape or IE. Am I supposed to change the class tag too? (If possible, please provide specifics....

Thx...!

Zach Elfers
12-09-2002, 02:52 PM
No. property stands for link, hover, active, or visited.

link = a link before it is clicked
hover = when the mouse is moved over it
active = when it has the dotted line around it
visited = a link after it is clicked

cis
12-09-2002, 02:58 PM
Sorry, I miswrote - just reedited -

Am I supposed to change the class="white10ptarial" to class="white10ptarial:property"

Does this fix only work for Netscape or for IE also as well?

Zach Elfers
12-09-2002, 03:03 PM
No. The class white10ptarial is fine. In the CSS style sheet put:

a.white10ptarial:hover

for example. white10ptarial is still the class but before it is put a which means this is for the <a> HTML tag which is used to create links. After the class is :hover which means that the <a class="white10ptarial" when the mouse is over the link, it will get the formatting you give it.

Zach Elfers
12-09-2002, 03:37 PM
<style>

a.white10ptarial:link {
font-weight: bold;
font-size: -1;
color: white;
font-family: Arial,Helectiva;
text-decoration: none
}
a.white10ptarial:hover {
font-weight: bold;
font-size: -1;
color: white;
font-family: Arial,Helectiva;
text-decoration: none
}
a.white10ptarial:active {
font-weight: bold;
font-size: -1;
color: white;
font-family: Arial,Helectiva;
text-decoration: none
}
a.white10ptarial:visited {
font-weight: bold;
font-size: -1;
color: white;
font-family: Arial,Helectiva;
text-decoration: none
}
</style>
...
<a class="white10ptarial" href="site.html">Text</a>

This DOES work so if it doen't, than your doing something wrong.

cis
12-09-2002, 03:50 PM
Got it, thanks.

I mis understood your comments and what you were trying to get across the whole time.

Appreciated.

Zach Elfers
12-09-2002, 04:01 PM
lol, it was a little frustrating but that's ok.

cis
12-09-2002, 04:06 PM
Same here, lol -

Thanks again...:)

Stefan
12-09-2002, 06:04 PM
Originally posted by Zach Elfers
a:link
a:hover
a:active
a:visited

This DOES work so if it doen't, than your doing something wrong. [/B]

Actually, that order will not behave as expected.
Once a user has visited a link, it will NEVER again be able to get the :hover and :active states triggered (in a non buggy browser).

The Cascading in CSS makes it very important in which order you put rules.

Most people would want/expect the following order, which will give a hover & active state also on a visited link

a:link
a:visited
a:hover
a:active