[XHTML] Validité XHTML 1.0
Bonjour, j'ai validé ma page avec le XHTML 1.0 mais j'ai PLEIN d'erreur que je ne comprend pas ... Meme des erreurs avec la balise <head> ...
Voici le code de ma page :
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 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 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Conduite</title>
<link type="text/css" href="style.css" rel="stylesheet" />
</head>
<body>
<p><div class="titre">Suivi conduite accompagnée</div><br /><br /></p>
<?php
include('config.php');
$query = mysql_query("SELECT * FROM conduite");
echo'<table class="table_kms" border="1" align="center">';
echo'<thead>';
echo'<tr>';
echo'<th width="10%">Dates</td>';
echo'<th width="10%">Temps</td>';
echo'<th width="5%">Kms</td>';
echo'<th width="5%">Voiture</td>';
echo'<th width="35%">Circonstances</td>';
echo'<th width="30%">Remarques</td>';
echo'<th width="5%">Meteo</td>';
echo'</tr>';
echo'</thead>';
echo'<tfoot>';
echo'<tr>';
echo'<th width="10%">Dates</td>';
echo'<th width="10%">Temps</td>';
echo'<th width="5%">Kms</td>';
echo'<th width="5%">Voiture</td>';
echo'<th width="25%">Circonstances</td>';
echo'<th width="25%">Remarques</td>';
echo'<th width="5%">Meteo</td>';
echo'</tr>';
echo'</tfoot>';
echo'<tbody>';
while($conduite = mysql_fetch_array($query)){
echo'<tr>';
echo'<td>'.$conduite['date'].'</td>';
$temps = $conduite['tps'];
$temps = format_h($temps);
echo'<td>'.$temps.'</td>';
echo'<td>'.$conduite['kms'].'</td>';
echo'<td>'.$conduite['voiture'].'</td>';
echo'<td>'.$conduite['circonstances'].'</td>';
echo'<td>'.$conduite['remarques'].'</td>';
$meteo = $conduite['meteo'];
if($meteo == NULL){
$meteo = "Soleil";
}
echo'<td><p><img src="images/'.$meteo.'.gif" width="20" alt=""></p></td>';
echo'</tr>';
}
echo'</tbody>';
echo'</table>';
/* Calcul des variables */
$total_kms = mysql_query("SELECT SUM(kms) AS total_kms FROM conduite");
$total_kms = mysql_fetch_array($total_kms);
$total_kms = $total_kms['total_kms'];
$total_heures = mysql_query("SELECT SUM(tps) AS total_kms FROM conduite");
$total_heures = mysql_fetch_array($total_heures);
$total_heures = $total_heures['total_kms'];
$total_heures = format_h($total_heures);
$total_kms_par_voiture = mysql_query("SELECT voiture, SUM(kms) AS total_kms FROM conduite GROUP BY voiture");
$total_kms_par_meteo = mysql_query("SELECT IF(meteo = '', 'Beau temps', meteo) AS meteo, SUM(kms) AS total_kms FROM conduite GROUP BY meteo");
$total_kms_avec_caravane = mysql_query("SELECT SUM(kms) AS total_kms_caravane FROM conduite WHERE remarques='Caravane'");
$total_kms_avec_caravane = mysql_fetch_array($total_kms_avec_caravane);
$total_kms_avec_caravane = $total_kms_avec_caravane['total_kms_caravane'];
/* Fin du calcul des variables */
echo'<p><br /><br /></p>';
echo'<table class="table_stats" border="1" align="center">';
echo'<tr>';
echo'<td colspan="2">Nombre total de kilometres : <font color="red" size="+2">'.$total_kms.'</font> en <font color="red" size="+2">'.$total_heures.'</font></td>';
echo'</tr>';
echo'<tr>';
echo'<td width="50%">';
echo'<div align="left"><ul><li>Par voiture :</li>';
echo'<ul>';
while($kms_voiture = mysql_fetch_array($total_kms_par_voiture)){
$voiture = $kms_voiture['voiture'];
$voiture = $array_voiture[$voiture];
echo'<li>'.$kms_voiture['total_kms'].' kms avec la '.$voiture.'</li>';
}
echo'<li>'.$total_kms_avec_caravane.' kms avec la caravane</li>';
echo'</ul></ul></div></td>';
echo'<td width="50%">';
echo'<div align="left"><ul><li>Par condition meteo :</li>';
echo'<ul>';
while($meteo = mysql_fetch_array($total_kms_par_meteo)){
echo'<li>'.$meteo['meteo'].' : '.$meteo['total_kms'].' kms</li>';
}
echo'</ul></ul></div></td>';
echo'</tr></table>';
echo'<p><br /><br /><img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></p>';
mysql_close();
?>
</boby>
</html> |
et le CSS :
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 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| body {
background-color: #ffffff;
}
th {
background-color: #cccccc;
color: #000000;
font-weight: bold;
}
td {
background-color: #ffffff;
color: #000000;
text-align: center;
height: 25px;
}
.table_kms {
width: 750px;
border-collapse: collapse;
border: 1px solid;
}
.table_stats {
width: 550px;
border-collapse: collapse;
border: 1px dashed;
margin: auto;
padding: auto;
}
.titre {
text-align: center;
color: red;
font-size: 20px;
}
.total_kms {
color: #000000;
font-size: 15px;
}
.total_kms_rouge {
color: #ff0000;
font-size: 18px;
} |
Dites moi ou sont les erreurs SVP car la je comprend pas trop ces nouvelles "normes" :P Merci