...

View Full Version : selective hyperlink styles



no way
01-05-2003, 11:43 PM
Hi !

I try to change the color of my hyperlinks using for example
a:link {color: #FF0000}
a:visited {color: #00FF00}
a:hover {color: #FF00FF}
a:active {color: #0000FF}
So far no prob.

But I only want to have that in my contents. Is this possible to define this within the paragraph definition I have anyway (links would take these colors in paragraphs)?

<style type="text/css">
p
{
font-family: arial;
font-size: 11px;
margin-left: 20px;
margin-right: 20px
}
</style>

Tks for the help in advance
Fred

Oh man, I guess i've been to many hours on this this week-end...
http://www.geocities.com/verybadpage/page3.html

cg9com
01-06-2003, 02:19 AM
i cant think of a way off the top of my head, but you could assign a class to a link.

SYP}{ER
01-06-2003, 02:42 AM
Wrap your contents in <div class="contents"></div>

and then use this:


.contents a:link {color: #FF0000}
.contents a:visited {color: #00FF00}
.contents a:hover {color: #FF00FF}
.contents a:active {color: #0000FF}

cg9com
01-06-2003, 04:37 AM
class="" will go into <p> also if thats what you wanted to use.

no way
01-06-2003, 04:40 PM
Ok, it helps me further, thanks to all
.
What is if I want to assign a class to links? I have tried this way without success:

<html>
<head>

<style type="text/css">
.mmm a:link {color: #FF0000}
.mmm a:visited {color: #00FF00}
.mmm a:hover {color: #FF00FF}
.mmm a:active {color: #0000FF}
</style>

</head>

<body>

<a href="default.asp" target="_blank" class="mmm">This is a link</a>

</body>
</html>

Cheers - Fred

jtr
01-06-2003, 05:39 PM
<style type="text/css">
A.mmm:link {color: #FF0000;}
A.mmm:visited {color: #00FF00;}
A.mmm:hover {color: #FF00FF;}
A.mmm:active {color: #0000FF;}
</style>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum