The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Web Design
> CSS Help
|
using css and the CLASS parameter???
Discuss using css and the CLASS parameter??? in the CSS Help forum on Dev Shed. using css and the CLASS parameter??? Cascading Style Sheets (CSS) forum discussing all levels of CSS, including CSS1, CSS2 and CSS Positioning. CSS provides a robust way of applying standardized design concepts to your web pages.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

November 8th, 2001, 11:00 AM
|
|
Contributing User
|
|
Join Date: Jul 2001
Location: South Yorkshire
|
|
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???
__________________
regards,
pgudge
|

November 8th, 2001, 11:39 AM
|
|
Contributing User
|
|
Join Date: Mar 2001
Location: Chicago, IL
Posts: 63
Time spent in forums: < 1 sec
Reputation Power: 13
|
|
|
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;
}
|

November 8th, 2001, 11:42 AM
|
|
Contributing User
|
|
Join Date: Jul 2001
Location: South Yorkshire
|
|
nope
The
A.USER
{
......
}
Seems to work fine it's the :HOVER that is not working.
|

November 8th, 2001, 11:49 AM
|
|
Contributing User
|
|
Join Date: Mar 2001
Location: Chicago, IL
Posts: 63
Time spent in forums: < 1 sec
Reputation Power: 13
|
|
|
the BIG question is: are you using NS4.x??? If so, it won't work as this property isn''t supported in NS4.x
|

November 8th, 2001, 12:34 PM
|
|
Contributing User
|
|
Join Date: Jul 2001
Location: South Yorkshire
|
|
|
RE:
IE5.5 and IE6
|

November 8th, 2001, 02:56 PM
|
|
Contributing User
|
|
Join Date: Mar 2001
Location: Chicago, IL
Posts: 63
Time spent in forums: < 1 sec
Reputation Power: 13
|
|
Quote: | 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.
|

November 8th, 2001, 03:22 PM
|
|
Senior Citizen
|
|
Join Date: Jan 2001
Location: leftcoast
Posts: 2,019
Time spent in forums: < 1 sec
Reputation Power: 15
|
|
|
Last edited by adios : November 9th, 2001 at 05:56 PM.
|

November 10th, 2001, 08:58 PM
|
|
Contributing User
|
|
Join Date: Sep 2001
Location: London, UK
Posts: 661
Time spent in forums: < 1 sec
Reputation Power: 12
|
|
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 
|

November 19th, 2001, 02:02 PM
|
|
|
|
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
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|