Axel Richter: Verschiedene Linkfarben in einem Dokument?

Beitrag lesen

Hallo,

Ich will den Links in meinem HTML-Dokument unterschiedliche Farben geben.
Wenn ich die oben bei Body (z.b. <body link=#999999>) definiere, dann sind die Farben global und auf der ganzen Seite einheitlich.
Kennt jemand eine Lösung?
Danke

So?

<html>
<head>
<title></title>
<style type="text/css">
<!--
a.rot { font-weight:bold; color:#7E0000; text-decoration:none }
a.rot:hover { font-weight:bold; color:#FF0000; text-decoration:none }
a.gruen { font-weight:bold; color:#007E00; text-decoration:none }
a.gruen:hover { font-weight:bold; color:#00FF00; text-decoration:none }
a.blau { font-weight:bold; color:#00007E; text-decoration:none }
a.blau:hover { font-weight:bold; color:#0000FF; text-decoration:none }
-->
</style>
</head>
<body >
<a class="rot" href="#">roter Link</a>
<a class="gruen" href="#">gr&uumlner Link</a>
<a class="blau" href="#">blauer Link</a>
</body>
</html>

mit Verweis auf:

http://selfhtml.teamone.de/css/formate/zentrale.htm#klassen

und

http://selfhtml.teamone.de/css/eigenschaften/pseudoformate.htm

Gruß

Axel