Avatar billede zorg_86 Nybegynder
18. august 2003 - 21:07 Der er 3 kommentarer og
1 løsning

Link farve?

Hej

Hvordan laver jeg så noget af teksten på min side har stylen:

<style type="text/css">
A:link {
  text-decoration : underline;
  color : #FFFFFF
}
A:visited {
  text-decoration : underline;
  color : #FFFFFF
}
A:active {
  text-decoration : underline;
  color : #FFFFFF
}
A:hover {
  text-decoration : none;
  color : #FFFFFF
}
</style>

Og resten skal have denne style:

<style type="text/css">
A:link {
  text-decoration : underline;
  color : #000000
}
A:visited {
  text-decoration : underline;
  color : #000000
}
A:active {
  text-decoration : underline;
  color : #000000
}
A:hover {
  text-decoration : none;
  color : #FFFFFF
}
</style>
Avatar billede Jman Praktikant
18. august 2003 - 21:11 #1
din alternative farve kan du kalde
A.alt:link
A.alt:hover
o.s.v.
i din linkkode skriver du <a class=alt href"ditlink">ditlin</a>
Avatar billede superanden Nybegynder
18. august 2003 - 21:12 #2
<link rel="stylesheet" type="text/css" href="style.css">
Avatar billede mm12010 Nybegynder
18. august 2003 - 21:15 #3
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>389240</title>
<style type="text/css">
.style1 A:link {
  text-decoration : underline;
  color : #FFFFFF
}
.style1 A:visited {
  text-decoration : underline;
  color : #FFFFFF
}
.style1 A:active {
  text-decoration : underline;
  color : #FFFFFF
}
.style1 A:hover {
  text-decoration : none;
  color : #FFFFFF
}
.style2 A:link {
  text-decoration : underline;
  color : #000000
}
.style2 A:visited {
  text-decoration : underline;
  color : #000000
}
.style2 A:active {
  text-decoration : underline;
  color : #000000
}
.style2 A:hover {
  text-decoration : none;
  color : #FFFFFF
}
</style>
</head>
<body>
<div class="style1"><a href="#">noget tekst</a></div>
<br>
<div class="style2"><a href="#">noget tekst</a></div>
<br>
</body>
</html>
Avatar billede superanden Nybegynder
18. august 2003 - 21:16 #4
altså du gemmer din fil fra <style> til </style> som style.css og ligger den i samme mappe som alle dine andre filer og så insætter du
<link rel="stylesheet" type="text/css" href="style.css"> i <head> på alle dine html filer, så får du stylen
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester