Bonjour tout le monde,
J'avais créé mon site dans un encodage pas très pratique et j'ai modifié l'encodage de ma page pour la mettre en UTF-8. Tout fonctionne à merveille, sauf que j'ai à présent un espace sur le haut de ma page et j'ai tout essayé, impossible de le supprimer. Voici mon fichier CSS :
Code CSS : 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57 body,td,th,input,textarea,select { font-family: "Verdana", sans-serif; font-size: 14px; color: #000000; } body { background-color: #FFFFFF; margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; } a:link, a:visited { color: #000000; text-decoration: none; } a:hover { color: #A8022C; text-decoration: none; } a:active { color: #FFFF4F; text-decoration: none; } h1 { font-size: 25px; text-decoration: underline; margin: 15px 0px 10px 0px; } h2 { font-size: 20px; text-decoration: underline; margin: 15px 0px 10px 0px; } h3 { font-size: 17px; text-decoration: underline; margin: 15px 0px 10px 0px; } .error { font-weight: bold; color: #A8022C; } .valide { font-weight: bold; color: #033D21; } .relode:hover { background-color: #CCCCCC; } .menuT { font-weight: bold; padding: 10px 0px 2px 0px; } .menu1 { text-indent: 10px; }
Bien que j'ai réglé le padding et le margin à 0px et bien que ma page HTML/PHP trouve mon fichier CSS, j'ai ce maudis espace qui ne veut pas partir... Voici un aperçu en image :
On voir bien l'espace en blanc entre le départ de mon tableau (noir) et de la fenêtre de mon navigateur. Normalement, le cadre noir devrait coller à la fenêtre du haut de mon navigateur.
Voici ma page HTML qui montre bien qu'il n'y a rien entre la balise <body> et <table> :
Code HTML : 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68 <?php define('MAJ','29.01.2021 05:59:22'); // Inclusions des fichiers principaux define('INCLUDES_FILES',array('header'=>'header.php', 'footer'=>'footer.php', 'variables'=>'variables.php', 'fonctions'=>'fonctions.php' )); foreach(INCLUDES_FILES as $index => $files) { if (!file_exists('includes/'.$files)) { header('Location: alerte.php?warning='.$files); } if (($index == 'variables') || ($index == 'fonctions')) { include('includes/'.$files); } } ?> <!DOCTYPE lang="fr-CH"> <html> <head> <title>Administrations</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="pragma" content="no-cache" /> <link rel="stylesheet" href="images/designs/styles.css" /> <script src="https://kit.fontawesome.com/2e9b34a81e.js"></script> </head> <body> <table border="0" width="100%" cellpadding="15" cellspacing="0"> <tr><td colspan="2" align="left" valign="top" bgcolor="#000000"><div style="color: #FFFFFF; font-weight: bold; font-size: 37px;">ADMINISTRATION de Gwanda.ch</div></td></tr> <tr> <td width="150" align="left" valign="top" bgcolor="#CCCCCC"> <div align="left" class="menuT"><a href="index.php" target="_parent"><nobr>Administration</nobr></a></div> <div align="left" class="menu1"><a href="infoPHP.php" target="_blank"><nobr>PHP Infos</nobr></a></div> <div align="left" class="menuT"><a href="sites.php" target="_parent"><nobr>Gestion des Sites</nobr></a></div> <div align="left" class="menu1"><a href="config.php" target="_parent"><nobr>Configurations</nobr></a></div> <div align="left" class="menu1"><a href="news.php" target="_parent"><nobr>News</nobr></a></div> <div align="left" class="menu1"><a href="faq.php" target="_parent"><nobr>Support/FAQ</nobr></a></div> <div align="left" class="menu1"><a href="compteurs.php" target="_parent"><nobr>Compteurs Visites</nobr></a></div> <div align="left" class="menu1"><a href="simleys.php" target="_parent"><nobr>Simleys</nobr></a></div> <div align="left" class="menuT"><a href="gwanda.php" target="_parent"><nobr>Gwanda</nobr></a></div> <div align="left" class="menu1"><a href="gw_users.php" target="_parent"><nobr>Membres</nobr></a></div> <div align="left" class="menu1"><a href="gw_tutos.php" target="_parent"><nobr>Tutoriels</nobr></a></div> <div align="left" class="menu1"><a href="gw_tutosmsg.php" target="_parent"><nobr>Messages des tutoriels</nobr></a></div> </td> <td align="left" valign="top"> <? $accent = 'Page avec des éàè # $ " '; echo htmlspecialchars($accent); ?> <div align="center"><a href="" target="_parent" title="Remonter sur le haut de la page" style="top: 0;"><span style="font-size: 20px;"><i class="fas fa-sort-up"></i></span></a></div> </td> </tr> </table> <div align="right" style="color: #CCCCCC;">Mise à jour le <?=MAJ;?> </div> </body> </html>
Bref... J'ai ce problème depuis que j'ai mis mes fichier avec l'encodage UTF-8. Mais je ne comprends pas trop le raport et pourquoi cet espace?
J'ai tout testé, modifier l'encodage de ma page CSS, j'ai tout réécrit, j'ai placé le code CSS dans le header, etc. Et là, je suis à cours d'idée.
Quelqu'un pourrait peut-être m'aider à trouver une solution pour supprimer cet espace blanc??
Partager