---
title: "Validatorn hatar mig!"
type: "forum-thread"
url: "https://www.webforum.nu/amne/html-css/70493-validatorn-hatar-mig"
topic: "HTML & CSS"
topic_url: "https://www.webforum.nu/amne/html-css"
author: "Peeer"
published: "2003-03-08T20:37:40.000Z"
updated: "2003-03-08T23:09:06.000Z"
replies: 3
views: 178
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/70493-validatorn-hatar-mig"
---

# Validatorn hatar mig!

## #1 — Peeer, 2003-03-08T20:37Z

Jag har suttit här ett bra tag och tittat på följande kodstycke. Men hur jag än gör så klagar validatorn på en massa. Jag kan förstå att den klagar på opacity-koden, men resten? Någon som ser något galet?

[Valideringen ser ut så här](http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fuser.tninet.se%2F%7Eqeq935s%2Fstyle.css&warning=1&profile=css2) 

```
body {
   background-color: #003366;
   background-image:url(../images/background.gif);
}
table.transparent {
   -moz-opacity: 60%; 
   filter:alpha(opacity=60); 
   height:100%; 
   width:600px;
   z-index:1;
}

.content {
   position:relative; 
   width:100%; 
   height:100%; 
   z-index:2;
   font-family: Verdana, Helvetica, Arial, Times New Roman;
   font-size: 10pt;
}

.top_left {
   background-image:url(../images/top_left.gif);
   width:12px;
   height:14px;
}

.top {
   background-image:url(../images/top.gif);
   height:14px;
}

.top_right {
   background-image:url(../images/top_right.gif);
   width:14px;
   height:14px;
}

.left {
   background-image:url(../images/left.gif);
   width:12px;
}

.center {
   vertical-align:top;
   background-color:#cccccc;
}

.right {
   background-image:url(../images/right.gif);
   width:14px;
}

.bottom_left {
   background-image:url(../images/bottom_left.gif);
   width:12px;
   height:13px;
}

.bottom {
   background-image:url(../images/bottom.gif);
   height:13px;
}

.bottom_right {
   background-image:url(../images/bottom_right.gif);
   width:14px;
   height:13px;
}
```

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

## #2 — Nexus86, 2003-03-08T20:55Z

Kan tänka mej att du ska ha 

```
<style type="text/css">
<!--
```

 före alltihop och 

```
-->
</style>
```

efter alltihop.

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

## #3 — mikkeX, 2003-03-08T21:46Z

Varningarna är inte så förklarande, men anledningen till att det inte validerar är att väljare inte får innehålla \_ (underscore).
Byt ut .top_left mot topLeft el top-Left till exempel och så vidare.

Och nexus86 - externa css-filer ska inte innehålla style taggar.

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

## #4 — Peeer, 2003-03-08T23:09Z

> **mikkeX skrev:**
>
> Varningarna är inte så förklarande, men anledningen till att det inte validerar är att väljare inte får innehålla \_ (underscore).
> Byt ut .top_left mot topLeft el top-Left till exempel och så vidare.

Det hade jag inte en aning om, tack för upplysningen!

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

---

Tråden på webben: https://www.webforum.nu/amne/html-css/70493-validatorn-hatar-mig
