Forums
This topic is locked
Need help with links and CSS
Posted 03 May 2006 20:05:35
1
has voted
03 May 2006 20:05:35 Thin Lizzy posted:
On my web pages I want 2 different looks for links. Different colors/rollovers. It seems I can only create one CSS a:link to do this no optino for more?Can someone tell me if there is a way?
Thanks<font face='Arial'></font id='Arial'>
Replies
Replied 03 May 2006 22:44:44
03 May 2006 22:44:44 micah santos replied:
<html>
<head>
<title>CSS</title>
<style type="text/css">
.link1 a:link
{ font-family: verdana;
color: #000000; text-decoration: none
}
.link1 a:visited
{
font-family: verdana;
color: #000000;
text-decoration: none
}
.link1 a:hover
{
font-family: verdana;
color: #ff0000;
text-decoration: none
}
.link1 a:active
{
font-family: verdana;
color: #000000;
text-decoration: underline
}
.link2 a:link
{ font-family: verdana;
color: blue; text-decoration: underline;
}
.link2 a:visited
{
font-family: verdana;
color: blue; text-decoration: underline;
}
.link2 a:hover
{
font-family: verdana;
color: #000000; text-decoration: underline;
}
.link2 a:active
{
font-family: verdana;
color: blue; text-decoration: underline;
}
</style>
</head>
<body>
<span class="link1">
<a href="#">Link A</a><br>
<a href="#">Link B</a>
</span>
<br><br>
<span class="link2">
<a href="#">Link A</a><br>
<a href="#">Link B</a>
</span>
</body>
</html>
<head>
<title>CSS</title>
<style type="text/css">
.link1 a:link
{ font-family: verdana;
color: #000000; text-decoration: none
}
.link1 a:visited
{
font-family: verdana;
color: #000000;
text-decoration: none
}
.link1 a:hover
{
font-family: verdana;
color: #ff0000;
text-decoration: none
}
.link1 a:active
{
font-family: verdana;
color: #000000;
text-decoration: underline
}
.link2 a:link
{ font-family: verdana;
color: blue; text-decoration: underline;
}
.link2 a:visited
{
font-family: verdana;
color: blue; text-decoration: underline;
}
.link2 a:hover
{
font-family: verdana;
color: #000000; text-decoration: underline;
}
.link2 a:active
{
font-family: verdana;
color: blue; text-decoration: underline;
}
</style>
</head>
<body>
<span class="link1">
<a href="#">Link A</a><br>
<a href="#">Link B</a>
</span>
<br><br>
<span class="link2">
<a href="#">Link A</a><br>
<a href="#">Link B</a>
</span>
</body>
</html>
Replied 03 May 2006 22:57:01
03 May 2006 22:57:01 Thin Lizzy replied:
thanks