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

HYPER;INK COLOR CHANGE

Status
Not open for further replies.

fishin4snook

IS-IT--Management
Sep 20, 2000
83
US
How can I get my hyperlinks to be different colors than on another. EG: Hyperlink#1 = the color blue - Hyperlink #2 = the color green.

Thank you,
Fishin4snook.
discountvacations@yahoo.com [sig][/sig]
 
you can use cascading style sheets and asign classes to the links i.e.,

A.site:link {
color:rgb(0,0,0);
text-decoration:underline;
font-family:Arial,Helvetica,sans-serif;
font-size: x-small; }

A.site1:link {
color:rgb(255,128,0);
text-decoration:underline;
font-family:Arial,Helvetica,sans-serif; }

A.site2:link {
color:rgb(0,0,0);
text-decoration:underline;
font-family:Arial,Helvetica,sans-serif;
font-size: x-small; }

and so on and so on.

In your link it would look like this <a href=&quot;your.html&quot; style=&quot;sitex&quot;>

with the x being the site style number.

[sig][/sig]
 
How do you enter a style sheet into the html? [sig][/sig]
 
There are a couple of ways. First you can put the code that WebGodiva wrote in the <head> of your page enclosed in tags like such:

<style type=&quot;text/css&quot;>
A.site:link {
color:rgb(0,0,0);
...etc...
</style>

Second, you can save the code WITHOUT the <style> tags into a file with extension .CSS and reference it in the head of your code with a tag like this:

<link rel=stylesheet href=&quot;/style.css&quot; type=&quot;text/css&quot;>

The href parameter should be the relative path and filename of the .CSS file you created. This technique is very useful if you have many pages (or a whole site) using the same style sheet. You can change it in one place and the styles are changed everywhere.

Otherwise both these work exactly the same. There are some great programs for designing style sheets. I use Bradsoft's TopStyle Pro ( I don't know how this one compares to others but I like this one a lot.

[sig][/sig]
 
Thank you for your response, do you design site? If so what sites have you designed and how much did you charge for them? What other uses does the style sheet pro have? [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top