---
title: "olika länkar med olika active och hover"
type: "forum-thread"
url: "https://www.webforum.nu/amne/html-css/48257-olika-länkar-med-olika-active-och-hover"
topic: "HTML & CSS"
topic_url: "https://www.webforum.nu/amne/html-css"
author: "daniel_ra"
published: "2002-07-19T22:00:39.000Z"
updated: "2002-07-19T22:16:49.000Z"
replies: 2
views: 336
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/html-css/48257-olika-länkar-med-olika-active-och-hover"
---

# olika länkar med olika active och hover

## #1 — daniel_ra, 2002-07-19T22:00Z

Jag skulle vilja styra utseendet på alla mina länkar med css. Jag har dock ett problem. Eftersom min bakgrund består av olika färger kan jag inte ha samma färg på alla länkar eftersom de då inte skulle synas mot bakgrunden.

exeplelvis vill jag att vissa länkar skall se ut såhär:

A:link { text-decoration: none; color: blue}
A:active { text-decoration: none; color: blue}
A:visited { text-decoration: none; color: blue}
A:hover { text-decoration: none; color: red}

och andra såhär

A:link { text-decoration: none; color: red}
A:active { text-decoration: none; color: red}
A:visited { text-decoration: none; color: red}
A:hover { text-decoration: none; color: blue}

går detta att lösa på något vis..

väldigt tacksam för hjälp.

Permalänk: https://www.webforum.nu/p/48257

## #2 — Matte, 2002-07-19T22:13Z

Du får använda class i dina länkar t.ex såhär:

CSS-koden:

```
A.typ1:link { text-decoration: none; color: blue} 
A.typ1:visited { text-decoration: none; color: blue} 
A.typ1:hover { text-decoration: none; color: red}
A.typ1:active { text-decoration: none; color: blue} 

A.typ2:link { text-decoration: none; color: red} 
A.typ2:visited { text-decoration: none; color: red} 
A.typ2:hover { text-decoration: none; color: blue} 
A.typ2:active { text-decoration: none; color: red}
```

 
Och sedan två länkar med olika utseende:

```
<a href="sida1.html" class="typ1">Blå länk</a>
<a href="sida2.html" class="typ2">Röd länk</a>
```

Permalänk: https://www.webforum.nu/p/724338

## #3 — daniel_ra, 2002-07-19T22:16Z

tack så jättemycket.. har slitet för att komma på hur jag ska göra !!!

Permalänk: https://www.webforum.nu/p/724340

---

Tråden på webben: https://www.webforum.nu/amne/html-css/48257-olika-länkar-med-olika-active-och-hover
