
Incompabilité xhtml et php
attention par contre, la page sera envoyée en application/xhtml+xml même pour les navigateurs qui acceptent ce type de média mais indiquent préférer le text/html (comme Opera par exemple).
Explication et solution:
http://webnaute.net/Journal/2003/12/10/Sacre-opera/ (première partie du billet)
Explication et solution:
http://webnaute.net/Journal/2003/12/10/Sacre-opera/ (première partie du billet)
« La vie d’un geek est un combat perpétuel contre l’imperfection »
le lien vers ma page (c'est hébergé chez moi pour l'instant) : http://213.36.124.137/antoine/
j'ai défini le fond dans mon style css :
j'ai défini le fond dans mon style css :
Code : Tout sélectionner
body {
margin: 25px;
background-color: #eeeeee;
font-family: Georgia, "Times new Roman", Times, serif;
font-size: 16px;
}
.content {
width: 70%;
border: 1px groove #000000;
background-color: #ffffff;
padding: 1em 1%;
}
.menu {
position: absolute;
top: 2em;
right: 2%;
border: 1px dashed #B70000;
padding: 1em;
width: 20%;
background-color: #ffffff;
}
html>body .menu {
position: fixed;
}
.pied {
padding: 1em;
}
hr {
border: 1px groove #eeeeee;
}
h1 {
font-family: Georgia;
font-size: 20px;
font-weight: bold;
color: #B70000;
text-indent: 1em;
}
donc tu mets un truc du genre :
Code : Tout sélectionner
html {margin:0px;background:#EEEEEE;}
Ou plutôt en PHP datant d'après les dinausores $_SERVER et pas $HTTP_SERVER_VARS.calimo a écrit :Code : Tout sélectionner
<?php if( stristr($HTTP_SERVER_VARS["HTTP_ACCEPT"], "application/xhtml+xml") ) { header("Content-Type: application/xhtml+xml"); echo "<?xml version='1.0' encoding='iso-8859-1'?>\n"; } ?>

et pour le XML ce serait pas plutôt des " (version="1.0")?

-
- Iguane
- Messages : 693
- Inscription : 20 févr. 2004, 20:46
-
- Iguane
- Messages : 693
- Inscription : 20 févr. 2004, 20:46
-
- Iguane
- Messages : 693
- Inscription : 20 févr. 2004, 20:46
Qui est en ligne ?
Utilisateurs parcourant ce forum : Aucun utilisateur inscrit et 0 invité