Bonjour j'ai un petit problème avec l'affichage d'un background dans des balises DIV.
Fichier header.php
Code HTML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 <html> <head> <title></title> <link rel="stylesheet" type="text/css" href= "./site.css"> </head> <body> <div class="haut">aaaaaa</div> <div class="dos" align="center">
Le fichier index.php
Code HTML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 <? include ('./header.php'); ?> Test, test <br /> test <? include ('./footer.php'); ?>
Le fichier footer.php
Code HTML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 </div> <div class="bas"></div> </body>
et enfin le css site.css
Et ça n'affiche pas de background ... pourtant les liens vers les images sont correct .. le css fonctionne bien puisque pour "haut" j'ai bien le texte en rouge ..
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 haut { background-image:url(images/top.png); background-position: center; background-attachment: fixed; background-repeat: no-repeat; color: red; } bas { background-image:url(images/bot.png); background-position: center; background-attachment: fixed; background-repeat: no-repeat; } dos { background-image:url(images/back.png); background-position: center; background-attachment: fixed; background-repeat: repeat; }
Par contre si j'utilise ceci pour header.php
Code HTML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 <html> <head> <title></title> <link rel="stylesheet" type="text/css" href= "./site.css"> </head> <body> <div style="background-image:url(images/top.png);">aaaaaa</div> <div style="background-image:url(images/back.png);">
Alors dans ce cas ça fonctionne .. mais c'est pas ce que je veux.. je veux centraliser mes style sur un fichier séparé ..
Merci d'avance pour votre aide
Partager