hyperlink 2 different colors?

i have something like this:

.link a {color:blue;}
.link a:hover {color:orange;}

<div class="link"><a href=http://www.webdeveloper.com/forum/archive/index.php/"#">line 1<br>line 2</a></div>

is there a way for me to make line 1 a certain color and line 2 a certain color but they take the same hover effect? the easy way out is to make each line its own link and apply the same hover effect, but i want to make the 2 lines seem as one but different colors. i tried placing line 2 into its own <font> tag with a class, but then it wont take the hover effect of the parent class and i cant seem to apply a hover effect for that font tag. any suggestions?How about:

.link a {color: blue;}
.link a:hover {color: red;}
.link a:hover span{color: green; text-decoration: none;}

<div class="link"><a href=http://www.webdeveloper.com/forum/archive/index.php/"#">line 1<br><span>line 2</span></a></div>something like this might get you going in the right direction:

css

a:link {color: #CCCCCC;}
a:hover {color: #999999;}
.linetwo {color: #000000;}
.linetwo:hover {color: #999999;}

html

<!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" xml:lang="en" lang="en" >
<head>
<title>testing</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" href=http://www.webdeveloper.com/forum/archive/index.php/"test.css" type="text/css" />
</head>
<body>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"#">line one <br /><span class=linetwo>line two</span></a>

</body>
</html>

I'm doing it with a span that uses class definitions. But there are surely other ways to do it. . .:)

Ian
 
Back
Top