Toon posts:

[CSS] Background image op de body tag

Pagina: 1
Acties:

Verwijderd

Topicstarter
Beste Mensen,

Ik zit wil graag een gif-afbeelding gebruiken als background. Hiervoor heb ik het volgende bestand gemaakt:

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <title>test</title>
    <style type="text/css">
    body {
        background-image:   url ("bg.gif");
        background-repeat:  repeat-y;
        background-color:   #ffffff;
        color:          Red;
    }
    </style>
</head>

<body>

<div>test</div>

</body>

</html>


Dit geeft echter geen achtergrond afbeelding. De html valideerd correct bij het w3c. De css geeft echter de volgende foutmelding:

code:
1
2
3
4
5
6
7
8
9
    * Line: 0 Context : body

      Invalid number : background-imageurl is not a background-image value : url
    * Line: 0 Context : body

      Parse Error - ("bg.gif");
    * Line: 0

      Parse Error - : repeat-y; background-color: #ffffff; color: Red; }


Ik zie echter niet in wat ik fout doe. Wat is mijn probleem?

PS. Ik heb zowel met IE6 als met mozilla de pagina bekeken.

[ Voor 11% gewijzigd door Verwijderd op 08-06-2004 22:29 ]


  • crisp
  • Registratie: Februari 2000
  • Laatst online: 15:44

crisp

Devver

Pixelated

spatie tussen url en ( weghalen?

Intentionally left blank


  • Rebels
  • Registratie: November 2001
  • Laatst online: 20-05-2023

Rebels

watev?!

crisp schreef op 08 juni 2004 @ 22:21:
spatie tussen url en ( weghalen?
ja en vervolgens nog wat rare html tags verwijderen

edit; sorry hij dacht [html] tag, voor topicstart :)

[ Voor 65% gewijzigd door Rebels op 08-06-2004 22:27 ]


Verwijderd

Topicstarter
Bedankt Crisp! :Y)


(Daar heb ik dan 2 uur op staan te staren 8)7)