Helpful Information
 
 
Category: CSS Help
using css and the CLASS parameter???

I have a .css file like so

A
{
TEXT-DECORATION: none;
}
A:HOVER
{
TEXT-DECORATION: underline;
}
A.USER
{
TEXT-DECORATION: none;
}
A.USER:HOVER
{
TEXT-DECORATION: underline;
COLOR: BLUE;
}

Now when I use the following line it doesn't work, am I doing something very silly?????

<a CLASS="USER" onclick="GoTo('user1')">User1</a>
<a CLASS="USER" onclick="GoTo('user2')">User2</a>
etc.
etc.

Might it be becuase I have no href parameter in the <a> tag???

try this:

A:link
{
TEXT-DECORATION: none;
}
A:HOVER
{
TEXT-DECORATION: underline;
}
A.USER:link
{
TEXT-DECORATION: none;
}
A.USER:HOVER
{
TEXT-DECORATION: underline;
COLOR: BLUE;
}

nope :(

The

A.USER
{
......
}

Seems to work fine it's the :HOVER that is not working.

the BIG question is: are you using NS4.x??? If so, it won't work as this property isn''t supported in NS4.x

IE5.5 and IE6

Might it be becuase I have no href parameter in the <a> tag???
i tested the code and it does seem like that is the problem. I have put your styles and your links into a test page, and... Use1 and User2 didn't even show up as links (ie5 on a mac).
change
<a CLASS="USER" onclick="GoTo('user1')">User1</a>
<a CLASS="USER" onclick="GoTo('user2')">User2</a>
to
<a CLASS="USER" href="javascript:GoTo('user1')">User1</a>
<a CLASS="USER" href="javascript:GoTo('user2')">User2</a>
this should do it.

HREF isn't just a parameter, it's an HTML attribute - and it's required to be specified with the tag, so the browser will know you want a hyperlink instead of a page anchor (<a name="...">).

http://developer.netscape.com/docs/manuals/htmlguid/tags7.htm#1604913

to use your class u gotta be looking at something like this I'd say

<a href="....." class="whatever" >

I kno that would work, cause I have it working on my site:)

Don't know if you got it sorted, but here is working code


<style>
A
{
TEXT-DECORATION: none;
}
A:HOVER
{
TEXT-DECORATION: underline;
}
A:LINK.USER
{
TEXT-DECORATION: none;
}
A:HOVER.USER
{
TEXT-DECORATION: underline;
COLOR: BLUE;
}

</style>
</head>

<body bgcolor="#FFFFFF" text="#000000">

Now when I use the following line it doesn't work, am I doing something very silly?????
<p>
<a href="javascript:" CLASS="USER" onclick="GoTo('user1')">User1</a> <br>
<a href="javascript:" CLASS="USER" onclick="GoTo('user2')">User2</a> </p>


Note the A:LINK.USER & A:HOVER.USER










privacy (GDPR)