---
title: "hover funkar inte!"
type: "forum-thread"
url: "https://www.webforum.nu/amne/html-css/1791-hover-funkar-inte"
topic: "HTML & CSS"
topic_url: "https://www.webforum.nu/amne/html-css"
author: "greymane"
published: "2002-01-23T23:01:00.000Z"
updated: "2002-07-21T22:29:53.000Z"
replies: 5
views: 381
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/1791-hover-funkar-inte"
---

# hover funkar inte!

## #1 — greymane, 2002-01-23T23:01Z

hoverfunktionen i min css-fil funkar bara ibland... ngn som vet varför? den ser ut såhär:

```
a:link {  font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal; color:  #0000CC; text-decoration: none}

a:hover {  font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal; color:  #0000CC; text-decoration: underline}

a:active {  font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal; color:  #0000CC; text-decoration: none}

a:visited {  font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal; color:  #0000CC; text-decoration: none}
```

den funkar väldigt sällan. det blir alltså inget streck under texten (som det borde bli)

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

## #2 — Sico, 2002-01-23T23:43Z

Det e inget som hellst fel på koden. Felet måste ligga nån annan stans.. Länkar css-filen på alla sidor?

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

## #3 — Matte, 2002-01-24T06:37Z

Lägg dom i följande ordning:

link
visited
hover
active

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

## #4 — greymane, 2002-01-24T08:22Z

det va ordningen det va fel på. tack i mängder! :)

varför är ordingen så viktig?

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

## #5 — Web-Tor, 2002-01-24T09:03Z

> Note that the A:hover must be placed after the A:link and A:visited
> rules, since otherwise the cascading rules will hide the 'color' property of the A:hover
> rule. Similarly, because A:active is placed after A:hover, the active
> color (lime) will apply when the user both activates and hovers over
> the A element.

 <http://www.w3.org/TR/REC-CSS2/selector.html#x33>  :)

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

## #6 — yaz, 2002-07-21T22:29Z

kunde inte ha sagt det bättre själv ;)

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

---

Tråden på webben: https://www.webforum.nu/amne/html-css/1791-hover-funkar-inte
