View Full Version : Link


Mrs Barrett
04-02-2006, 07:03 AM
I have inserted a link on my page to go another page and want to put a 2nd link for a different page, but it wont let me change font color...what am I doing wrong?
Pls help

Chris
04-02-2006, 01:43 PM
Do you want a different font colour for each link?

Mrs Barrett
04-02-2006, 02:10 PM
Yes pls, but it doesnt work when i change font colour

allie
04-02-2006, 07:19 PM
You can do it with css.

Your style sheet would look like this:

<style type="text/css">
<!--
a.blue:link {color: #0000ff; background: #ffffff;}
a.blue:visited {color: #0000ff; background: #ffffff;}
a.blue:hover {color: #0000ff; background: #ffffff;}
a.blue:active {color: #0000ff; background: #ffffff;}


a.red:link {color: #ff0000; background: #ffffff;;}
a.red:visited {color: #ff0000; background: #ffffff;}
a.red:hover {color: #ff0000; background: #ffffff;}
a.red:active {color: #ff0000; background: #ffffff;}


-->
</style>

And your html would look like this:

<a href="blue.htm" class="blue">Blue Link</a>
<a href="red.htm" class="red">Red Links</a>

You can make a class for all your colors.

Mrs Barrett
04-02-2006, 07:56 PM
Thanks, where do I insert it? The code I have is below...


<font face="comic sans ms"><font color="#00FFFF"size="3">TEXT <font face="calligraphic"><font color="#00FFFF"size="3"><a href=WEBSITE/>website

war59312
04-03-2006, 12:51 AM
Hey,

As requested! :D

<?xml version="1.0" encoding="us-ascii"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Style Test</title>

<style type="text/css">
/*<![CDATA[*/
<!--
p.text {
font-family: comic sans ms;
font-size: 300%;
color: #00FFFF;
}
p.url {
font-family: calligraphic;
font-size: 300%;
color: #00FFFF;
}
-->
/*]]>*/
</style>

</head>

<body>

<p class="text">TEXT</p>

<p class="url"><a href="http://www.example.com/"></a>WEBSITE</p>

</body>

</html>

Enjoy,

Will

Mrs Barrett
04-03-2006, 05:09 PM
thanks but this is not linking
<p class="url"><a href="site/"></a>text</p>

war59312
04-09-2006, 03:29 AM
What do you mean?

It should working using the code I gave you above. Just copy and paste?

Mrs Barrett
04-09-2006, 11:22 AM
Its ok np