Depuis plusieurs jours, je cherche une solution pour mon site que je suis entrain de refaire sans succès. Sous IE mon site prend en charge ma feuille de style. Par contre sous fireox le message d'erreur suivant apparaît dans la console JAVA de ma barre d'outil Webdevelopper installée pour mon navigateur : Erreur : La feuille de style http://www.nicolas79.ch/monstyle.css n'a pas été chargée car son type MIME, « text/html », n'est pas « text/css ». Mon hébergeur me précise que cela ne peut pas venir d'un problème de son serveur. Il me conseille en substance de renoncer à Firefox. Néanmoins, je ne le souhaite pas. Y-a-t-il une solution à mon problème. Voici mon code : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="fr">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
<meta http-equiv="content-language" content="fr"/>
<title>Site personnel de Nicolas</title>
<link rel="stylesheet" type="text/css" href="./monstyle.css" />
</head>
<body>
<div id="conteneur">
<h1 id="header">nicolas79.ch</h1>
<h2 id="headermenuhorizontal">
<a href="Default.htm">Accueil</a> <span class="style7">|</span>
<a href="">Présentation</a> <span class="style7">|</span>
<a href="">CV</a> <span class="style7">|</span>
<a href="">Liens</a> <span class="style7">|</span>
<a href="">Contact</a> <span class="style7">|</span>
<a href="">Plan du site</a>
</h2>
<ul class="menugauche">
<li><a href="">menu1</a></li>
<li><a href="">menu2</a></li>
</ul>
</div>
</body>
</html>
Voici le code de ma feuille de style :
body {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:small;
margin: 10px 0;
padding: 0;
background-color: #EEEEEE;
}
div#conteneur {
width:760px;
margin:0 auto;
text-align:left;
border: 2px solid #E0E6FC;
background: #fff;
height: 550px;
}
h1#header {
width:100px;
height:50px;
font-size:16px;
font-weight:bold;
font-family: Verdana, Arial;
text-align: left;
letter-spacing: 5px;
text-decoration: none;
margin-top: 10px;
margin-left: 10px;
color: #6894FB;
}
h2#headermenuhorizontal {
width:760px;
height:15px;
background-color: #ECF1FF;
text-align: center;
font-family: Verdana, Arial;
font-size: small;
word-spacing: 12px;
}
h2#headermenuhorizontal a:link {color:#6894FB; text-decoration:none;}
h2#headermenuhorizontal a:hover {
color:#6894FB;
text-decoration:none;
background-color: #FEE1C7;
}
h2#headermenuhorizontal a:active {color:#FF0000; text-decoration:none;}
.menugauche{
margin-top: 30px;
width: 160px;
border: 2px solid #EEEEEE;
margin-left: 12px;
list-style-position: inside;
background-color: #F4F4F4;
}
.menugauche a:link {
color:#0000FF; text-decoration:none;}
.menugauche a:hover{
color:#0000FF; text-decoration:none;}
.menugauche a:visited {color:#000075;
text-decoration:underline;
}
.menugauche a:active {color:#FF0000; text-decoration:underline;}
Est-ce une erreur dans mon code ?
Merci de m'aider.
---------------
Nic