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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to override link colors

Status
Not open for further replies.

mike2277

Programmer
Mar 25, 2002
54
US
Hi,
I am developing a dynamic web application in which I will allow the user to select one of five different stylesheets. The colors of the tables and text will change with each stylesheet.

I am using the following styles for my hyperlinks but I need to know if there's a way to override these colors on 1/2 of my page. On 1/2 these colors are just fine but on the other half I have a blue background for my menu and these blue hyperlinks won't be seen. Is there a way to override these settings so that my link color would be white in my blue menu table?

A:LINK{
color : Blue;
}

A:VISITED{
color : Purple;
}

A:HOVER {
color : Orange;
}

A:ACTIVE{
color : Blue;
}

Thanks!

Mike
 
Hi,

You continue by making more pseudo classes:

A.your_class:LINK{
color : Blue;
}
A.your_class:ACTIVE{
color : Blue;
}
A.your_class:VISITED{
color : Purple;
}

A.your_class:HOVER {
color : Orange;
}

Then in the HTML you call the class:
<a href=&quot;link&quot; class=&quot;your_class&quot;>link</a>

Hope this helps!

relax.gif


Keep up to date with my 2003 NHL Playoffs Wallpaper
 
Thanks so much! That's exactly what I was searching for! It works perfectly.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top