nag: A:link...

Beitrag lesen

hi,

du hast 2 möglichkeiten.

1. du kannst den Links ("a") eine Klasse zuweisen. Dann bekommen alle Links, denen du diese Klasse zuweist, die gewünschten Eigenschaften.

Bsp.:

<style type="text/css">
a.testname:link { font-weight:bold; color:#0000E0; text-decoration:none }
a.testname:visited { font-weight:bold; color:#000080; text-decoration:none }
a.testname:hover { font-weight:bold; color:#E00000; text-decoration:none }
a.testname:active { font-weight:bold; color:#E00000; text-decoration:underline }
</style>

Aufruf im HTML - Code:

<p> [...]
<a href="seite1.html" class="testname"> Link 1 </a>
<a href="seite2.html"> Link 2 </a>
[...]
</p>

<a href="seite3.html"> Link 3 </a>

2. möglichkeit:
du kannst ("p") ein individualformat (eine ID) zuweisen. dabei werden dann alle Links ("a") innerhalb von ("p") erfasst, und du musst nicht extra überall in den start-tag von ("a") eine zuweisung angeben, wie beim Klassennamen.

Bsp.:

<style type="text/css">
#testname a:link { font-weight:bold; color:#0000E0; text-decoration:none }
#testname a:visited { font-weight:bold; color:#000080; text-decoration:none }
#testname a:hover { font-weight:bold; color:#E00000; text-decoration:none }
#testname a:active { font-weight:bold; color:#E00000; text-decoration:underline }
</style>

Aufruf im HTML - Code:

<p id="testname"> [...]
<a href="seite1.html"> Link 1 </a>
<a href="seite2.html"> Link 2 </a>
[...]
</p>

<a href="seite3.html"> Link 3 </a>

mfg NAG