View Full Version : two sets of <a> CSS...
delphi_dawg
03-30-2002, 05:43 PM
Hi all,
I have a series of <a> tags -
but in the middle of the list of links -
i would like to change the attibutes of one of
the <a> to another hover, link, visited and active
to reflect a different color scheme -
Question is -
How do i tell the <a> tag to read from a different
CSS?
OR
do i hand jack the colors on this line item only - if this is the case, is there a code snippet the shows how this is accomplished???
thanks
tony
Dr. Web
03-31-2002, 10:55 AM
Hello Tony,
Your problem may be solved by using 'classes' for your href's. You may create as many classes as you like, and all you need to do is reference them. Here is an example of how to use three different classes on the same page.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<style>
a.swiss:link {color: red; text-decoration: none;}
a.swiss:visited{color: red; text-decoration: none;}
a.swiss:active{color: red; text-decoration: none;}
a.swiss:hover {color: yellow; text-decoration: none;}
a.cheese:link {color: blue; text-decoration: none;}
a.cheese:visited{color: blue; text-decoration: none;}
a.cheese:active{color: blue; text-decoration: none;}
a.cheese:hover {color: #cccccc; text-decoration: none;}
a.wow:link {color: black; text-decoration: underline;}
a.wow:visited{color: black; text-decoration: underline;}
a.wow:active{color: black; text-decoration: underline;}
a.wow:hover{color: blue; text-decoration: underline;}
</STYLE>
</style>
</head>
<body>
<a href="zonk.html" class="swiss">swiss</a>
<a href="zonk.html" class="cheese">cheese</a>
<a href="zonk.html" class="wow">w o w</A>
</body>
</html>
delphi_dawg
03-31-2002, 11:11 AM
Double thumbs up!!!
that got it!!!!
thanks x100000000
take care
tony
postitlord
04-01-2002, 12:24 AM
Ahhh, a simple example of classes, without spanning four beginners CSS pages, that was going to a question of mine in the next month or so. :):D:P:cool: Merci Beaucoup!
Dr. Web
04-01-2002, 02:32 PM
Originally posted by postitlord
Ahhh, a simple example of classes, without spanning four beginners CSS pages, that was going to a question of mine in the next month or so. :):D:P:cool: Merci Beaucoup!
Au Revoir. I know what you mean. After you become comfortible with coding, sometimes its a lot nicer to jump straight into working examples rather than sifting through tutorials.
vBulletin® v3.6.7, Copyright ©2000-2010, Jelsoft Enterprises Ltd.