Affichage sur IE
Résolu
MHH225
Messages postés
529
Date d'inscription
Statut
Membre
Dernière intervention
-
MHH225 Messages postés 529 Date d'inscription Statut Membre Dernière intervention -
MHH225 Messages postés 529 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
Je travail sur un nouveau site, et je construit en ce moment le design de ce site. Le testant régulièrement sur Firefox, je le teste de temps en temps sur Safari et IE. J'ai donc fait mon premier test sur tous ces navigateurs tout à l'heure. Et voilà ce que ça donne :
Firefox -> http://mathieu.havard.free.fr/uploads/design_firefox.jpg
Safari -> http://mathieu.havard.free.fr/uploads/design_safari.JPG
IE -> http://mathieu.havard.free.fr/uploads/design_ie.JPG
o_O
Pour les arrondis je ne m'étonne pas, IE ne supporte par border-radius. Mais pour le reste... !!!
Je poste mes codes de suite
Je travail sur un nouveau site, et je construit en ce moment le design de ce site. Le testant régulièrement sur Firefox, je le teste de temps en temps sur Safari et IE. J'ai donc fait mon premier test sur tous ces navigateurs tout à l'heure. Et voilà ce que ça donne :
Firefox -> http://mathieu.havard.free.fr/uploads/design_firefox.jpg
Safari -> http://mathieu.havard.free.fr/uploads/design_safari.JPG
IE -> http://mathieu.havard.free.fr/uploads/design_ie.JPG
o_O
Pour les arrondis je ne m'étonne pas, IE ne supporte par border-radius. Mais pour le reste... !!!
Je poste mes codes de suite
A voir également:
- Affichage sur IE
- Affichage double ecran - Guide
- Windows 11 affichage classique - Guide
- Ie tab - Télécharger - Outils pour navigateurs
- Problème affichage fenêtre windows 10 - Guide
- Problème affichage page internet google chrome - Forum Téléphones & tablettes Android
13 réponses
T'inquiètes pas c'est normal IE ne respecte aps du tout les normes W3C ^^ alors que safari lui a 100% et firefox presque a 100%
Voici ma page index.php (en fait index.php ne contient que le corps, le reste étant ajouté en include)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<title>Files On Line - <?php echo $titreDeLaPage; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" type="text/css" title="Design" href="<?php echo ROOTPATH; ?>/css.css" />
</head>
<body>
<div id="page">
<div id="en_tete">
<h1 style="color:white; text-align:center;">Titre</h1>
</div>
<div id="menu">
<h1 style="color:white; text-align:center;">Menu</h1>
</div>
<div id="corps">
<div id="partie_1">
<h1>PART 1</h1>
<h2>SS-PART 1-1</h2>
<h2>SS-PART 2-1</h2>
</div>
<div id="partie_2">
<h1>PART2</h1>
<h2>SS-PART 1-2</h2>
<h2>SS-PART 2-2</h2>
</div>
</div>
<div id="pied_de_page">
<h1 style="color:white; text-align:center;">Pied de page</h1>
</div>
</div>
<?php
mysql_close();
?>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<title>Files On Line - <?php echo $titreDeLaPage; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" type="text/css" title="Design" href="<?php echo ROOTPATH; ?>/css.css" />
</head>
<body>
<div id="page">
<div id="en_tete">
<h1 style="color:white; text-align:center;">Titre</h1>
</div>
<div id="menu">
<h1 style="color:white; text-align:center;">Menu</h1>
</div>
<div id="corps">
<div id="partie_1">
<h1>PART 1</h1>
<h2>SS-PART 1-1</h2>
<h2>SS-PART 2-1</h2>
</div>
<div id="partie_2">
<h1>PART2</h1>
<h2>SS-PART 1-2</h2>
<h2>SS-PART 2-2</h2>
</div>
</div>
<div id="pied_de_page">
<h1 style="color:white; text-align:center;">Pied de page</h1>
</div>
</div>
<?php
mysql_close();
?>
</body>
</html>
Et voici css.css
body /*Body*/
{
width:800px;
background-color:#140a50;
margin:auto;
}
#page /*Page*/
{
width:800px;
background-color:white;
-moz-border-radius:20px;
-webkit-border-radius:20px;
}
#en_tete /*En tête*/
{
background-color:#8791d7;
height:140px;
margin-bottom:25px;
-moz-border-radius:20px;
-webkit-border-radius:20px;
}
#menu /*Menu*/
{
width:750px;
height:50px;
background-color:black;
margin:auto;
margin-bottom:25px;
-moz-border-radius:25px;
-webkit-border-radius:25px;
}
#corps /*Corps*/
{
background-color:#8791d7;
text-align:justify;
padding:20px;
-moz-border-radius:20px;
-webkit-border-radius:20px;
}
#pied_de_page /*Pied de page*/
{
background-color:#8791d7;
height:70px;
margin-bottom:25px;
-moz-border-radius:20px;
-webkit-border-radius:20px;
}
body /*Body*/
{
width:800px;
background-color:#140a50;
margin:auto;
}
#page /*Page*/
{
width:800px;
background-color:white;
-moz-border-radius:20px;
-webkit-border-radius:20px;
}
#en_tete /*En tête*/
{
background-color:#8791d7;
height:140px;
margin-bottom:25px;
-moz-border-radius:20px;
-webkit-border-radius:20px;
}
#menu /*Menu*/
{
width:750px;
height:50px;
background-color:black;
margin:auto;
margin-bottom:25px;
-moz-border-radius:25px;
-webkit-border-radius:25px;
}
#corps /*Corps*/
{
background-color:#8791d7;
text-align:justify;
padding:20px;
-moz-border-radius:20px;
-webkit-border-radius:20px;
}
#pied_de_page /*Pied de page*/
{
background-color:#8791d7;
height:70px;
margin-bottom:25px;
-moz-border-radius:20px;
-webkit-border-radius:20px;
}
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Ah! ben je sais vraiment pas d'ou ça peut venir a par le fait que ça soit IE ^^! sur ta page d'accueuil tu peu pas faire un script php qui detecte le navigateur et tu créée une page speciale pour IE ?
Helà ! Après plusieurs tentatives de résolutions, j'en suis arrivé à supprimer la première ligne de ma page index.php (qu'on ne voit pas sur le code, je l'ai volontairement enlevé, pensant que ça ne gênait rien !) qui est un include('includes/config.php') ! Et ca marche ! Mais ce qui m'embête c'est que j'utilise exactement les même fichier config.php pour mon ancien site... trouvez l'erreur :P
Et pourtant j'ai lu et relu ce fichier ! Je le poste.
Et pourtant j'ai lu et relu ce fichier ! Je le poste.
config.php
<?php
/*
Mathieu
config.php
--------------
INCLUDE
Contient ROOTPATH et quelques fonctions fréquemment utilisées dans les pages
*/
//ROOTPATH, pour pouvoir avoir le chemin absolu des fichier, même après un changement d'adresse
define(ROOTPATH, 'http://' . $_SERVER['HTTP_HOST'] . '/fol', true);
//Connexion à la base de donnée
function connexion_db()
{
mysql_connect('localhost', 'root', '');
mysql_select_db('fol');
}
?>
<?php
/*
Mathieu
config.php
--------------
INCLUDE
Contient ROOTPATH et quelques fonctions fréquemment utilisées dans les pages
*/
//ROOTPATH, pour pouvoir avoir le chemin absolu des fichier, même après un changement d'adresse
define(ROOTPATH, 'http://' . $_SERVER['HTTP_HOST'] . '/fol', true);
//Connexion à la base de donnée
function connexion_db()
{
mysql_connect('localhost', 'root', '');
mysql_select_db('fol');
}
?>
Alors là je comprends vraiment pas !?!?!
Voici ma page config.php avec un petit script pour ne pas utiliser de ROOTPATH s'il y a IE comme navigateur
<?
$navigateur = htmlEntities($_SERVER['HTTP_USER_AGENT']);
//ROOTPATH, pour pouvoir avoir le chemin absolu des fichier, même après un changement d'adresse
//On detecte si le naviguateur est IE. ROOTPATH ne fonctionne pas avec IE.
if (preg_match("#Gecko#i", $navigateur))
{
define(ROOTPATH, 'http://' . $_SERVER['HTTP_HOST'] . '/fol/', true);
$rootpath = ROOTPATH;
}
elseif(preg_match("#MSIE#i", $navigateur))
$rootpath = 'http://localhost/fol/';
echo $rootpath;
?>
Et quand j'enlève le if{} et elseif{}, ca marche ! Mais si je n'enlève que le if{} (et que je transforme le elseif{} en if{}), ou seulement le esleif{}, ca ne marche pas !!!!
[EDIT]
En fait il suffisait que j'enlève le echo $rootpath et ca marche !!????
Voici ma page config.php avec un petit script pour ne pas utiliser de ROOTPATH s'il y a IE comme navigateur
<?
$navigateur = htmlEntities($_SERVER['HTTP_USER_AGENT']);
//ROOTPATH, pour pouvoir avoir le chemin absolu des fichier, même après un changement d'adresse
//On detecte si le naviguateur est IE. ROOTPATH ne fonctionne pas avec IE.
if (preg_match("#Gecko#i", $navigateur))
{
define(ROOTPATH, 'http://' . $_SERVER['HTTP_HOST'] . '/fol/', true);
$rootpath = ROOTPATH;
}
elseif(preg_match("#MSIE#i", $navigateur))
$rootpath = 'http://localhost/fol/';
echo $rootpath;
?>
Et quand j'enlève le if{} et elseif{}, ca marche ! Mais si je n'enlève que le if{} (et que je transforme le elseif{} en if{}), ou seulement le esleif{}, ca ne marche pas !!!!
[EDIT]
En fait il suffisait que j'enlève le echo $rootpath et ca marche !!????