Seite 1 von 1

CSS --> Links im <td> verändern

Verfasst: Sa 31. Jul 2004, 20:05
von alpi
Hi,

ich weiß, dass das eigentlich nichts mit Contenido oder so zu tun hat, aber es is eigentlich nur ne ganz einfache Frage.

Ich habe nämlich ein Layout, mit einer Tabelle.

Damit es einfach ist, habe ich das ein bischen gekürzt:

Code: Alles auswählen

<html>
<head>
<STYLE type="text/css">
                <!--
.inhalt
{
a { font-color: green;}
a:link { font-color: green;}
a:active { font-color: green;}
a:visited { font-color: green;}
a:hover { font-color: green;}
}

                -->
                </STYLE>
</head>
<body>
<table>
<tr>
<td class="inhalt">
<p>Hallo</p>
<a href="bla.html">srggf</a>
</td>
</tr>
</table>

</body>

</html>
Ich möchte nämlich alle Links, die in dem <td class="inhalt"> stehen, verändern, ohne das die anderen Links verändert werden.
Was muss ich dazu in die CSS schreiben?

Verfasst: So 1. Aug 2004, 06:51
von emergence
wenn ich mich nicht ganz irre

Code: Alles auswählen

<STYLE type="text/css"> 

a { font-color: green;} 
a:link { font-color: green;} 
a:active { font-color: green;} 
a:visited { font-color: green;} 
a:hover { font-color: green;}

td.inhalt a { font-color: red;}

</STYLE>

Verfasst: So 1. Aug 2004, 12:44
von alpi
ich habs jetzt selber.

in CSS gibt es kein font-color sondern das heißt color.

und a:link, a:active und so weiter sind auch nicht unbedingt notwendig, da nur ein a schon aureicht, um farbe oder so, zu verändern.

Code: Alles auswählen

<STYLE type="text/css">
      <!--      
.inhalt a {
color: green;
}
-->
                </STYLE>
Aber trotzdem Danke.

Noch einen schönen Sonntag.

Verfasst: So 1. Aug 2004, 12:56
von emergence
wie auch immer...