---
title: "class & stylesheet"
type: "forum-thread"
url: "https://www.webforum.nu/amne/html-css/1087-class-stylesheet"
topic: "HTML & CSS"
topic_url: "https://www.webforum.nu/amne/html-css"
author: "Binaryian"
published: "2001-05-15T13:00:00.000Z"
updated: "2001-05-15T13:25:00.000Z"
replies: 1
views: 203
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/1087-class-stylesheet"
---

# class & stylesheet

## #1 — Binaryian, 2001-05-15T13:00Z

Försöker få class att fungera. Använder följande kod i css-filen:

```
A.norm { color: #008080; font-family: Verdana; font-size: xx-small; text-decoration: none; }
A.norm:HOVER { color: #0000FF; font-family: Verdana; font-size: xx-small; text-decoration: none; }

A { color: #008080; font-family: Verdana; font-size: xx-small; font-weight: bold; text-decoration: none; }
A:HOVER { color: #0000FF; font-family: Verdana; font-size: xx-small; font-weight: bold; text-decoration: none; }
```

och följande i html-filen:

```
<a href="#Hem" class="norm">Hem</a>
```

men det vill inte fungera. Förslag?

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

## #2 — Binaryian, 2001-05-15T13:25Z

Jag hittade felet själv. ;)
Som vanligt är man lätt förvirrad...

Så här skulle det givetvis se ut:

```
A.norm { color: #008080; font-family: Verdana; font-size: xx-small; font-weight: normal; text-decoration: none; }
A.norm:HOVER { color: #0000FF; font-family: Verdana; font-size: xx-small; font-weight: normal; text-decoration: none; }

A { color: #008080; font-family: Verdana; font-size: xx-small; font-weight: bold; text-decoration: none; }
A:HOVER	{ color: #0000FF; font-family: Verdana; font-size: xx-small; font-weight: bold; text-decoration: none; }
```

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

---

Tråden på webben: https://www.webforum.nu/amne/html-css/1087-class-stylesheet
