Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Different a: classes on the same page

Status
Not open for further replies.

Streetdaddy

Programmer
Jun 10, 1999
161
AU
Is it possible to create a: classes so I can apply them to <a> tags on the same page.

I want to be able to show 2 or more a:link:active/a:visited:hover styles on the same page... Miles
vmiles@senet.com.au
 
you'll have to class them:

A.classname:hover
A.class2name:hover

etc.

Then give your links classes

<a href=&quot;classname&quot;>class1</a>
b2 - benbiddington@surf4nix.com
 
An example of what bangers has said with a bot more code is:

.aclass1
{

color: #FFFFFF;
text-decoration: none;
}
.aclass2
{
color: #FFFFFF;
text-decoration: none;
}
.aclass1 A:VISITED
{
color: #FF0000;
text-decoration: none;
}
.aclass2 A:VISITED
{
color: #FFFF00;
text-decoration: none;
}


<A HREF=&quot;blah.html&quot; class=&quot;aclass1&quot;>aclass1 hyperlink</A>
<A HREF=&quot;blahblah.html&quot; class=&quot;aclass2&quot;>aclass2 hyperlink</A>
 
Thanks! Ill try it as soon as I have time... Miles
vmiles@senet.com.au
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top