Zum Inhalt springen

unterschiedliche Formatierung von Links

Erstellt am 8. Juli 2004 · 4 Antworten · letzte Antwort am 12. Juli 2004

Tags: HTML & CSS, Frage

Julla ·

Die links in der Menüleiste sollen eine andere Farbe haben als die Links im Hauptteil. Wie kann ich das mit Hilfe von stylesheets machen!?
danke im voraus julla

TW ·

hi
verschiedene css klassen verwenden??

weiss ehrlich nicht, wo du genau drauf hinwillst?

cu
thorsten

Julla ·

naja im meinem stylesheet hab ich eine allgemeine def. für links

a:link {
color: #ffffff;
text-indent:0.0cm;
}

a:visited {
color: #ffffff;
text-indent:0.0cm;
}

a:hover {
color: #ffffff;
background: #006699;
text-indent:0.0cm;
}

a:active {
color: #ffffff;
background: #006699;
text-indent:0.0cm;
}

das problem ist das ich eine Meüleiste habe und auch andere links, die andersfarbig sein sollen.....
falls du es dir anschauen willst:
http://wwwiti.cs.uni-magdeburg.de/iti_amsl/

genau so soll das ganze später ausschauen....weil ich soll die seite in typo3 übertragen....

maxhb ·

Hi!
Im HTML-Template die Bereiche für das Menu bzw. den Inhalt in ein DIV verpacken:

...
<div id="content">###CONTENT###</div>
<div id="menu">###MENU###</div>
...

Dann per CSS formatieren:

#content a:link {
 color: #ffffff;
 text-indent:0.0cm;
}

#content a:visited {
  color: #ffffff;
 text-indent:0.0cm;
} 

#content a:hover {
  color: #ffffff;
  background: #006699;
 text-indent:0.0cm;
}

#content a:active {
  color: #ffffff;
 background: #006699;
 text-indent:0.0cm;
}

#menu a:link {
 color: #ffffff;
 text-indent:0.0cm;
}

#menu a:visited {
  color: #ffffff;
 text-indent:0.0cm;
} 

#menu a:hover {
  color: #ffffff;
  background: #006699;
 text-indent:0.0cm;
}

#menu a:active {
  color: #ffffff;
 background: #006699;
 text-indent:0.0cm;
}

CU
maxhb