Problème html

Fermé
tibo - 1 févr. 2010 à 20:48
Azerking Messages postés 977 Date d'inscription jeudi 5 novembre 2009 Statut Membre Dernière intervention 28 mars 2014 - 2 févr. 2010 à 13:22
Bonjour,
J'ai créé un site web avec nvu : sur IE il fonctionne, sur firefox il passe mal :
Sur W3C il détecte une erreure récurrente :
div id="2"
je comprends qu'un chiffre ne respecte pas le protocole je mets des lettres mais mon site ne marche plus du tout ?
ligne complète :

<div id="1"
style="position: absolute; visibility: hidden;"
onmouseout="cache(1)">
<table
onmouseover="document.getElementById(1).style.visibility = 'visible';controle(1,0)"
bgcolor="#3300ff" cellpadding="0" cellspacing="1"
width="125">

Merci
A voir également:

7 réponses

Azerking Messages postés 977 Date d'inscription jeudi 5 novembre 2009 Statut Membre Dernière intervention 28 mars 2014 187
1 févr. 2010 à 20:50
Ben oui hein, faut changer les id en id1 par exemple.
0
notobe Messages postés 1952 Date d'inscription mercredi 11 novembre 2009 Statut Membre Dernière intervention 8 juillet 2011 213
1 févr. 2010 à 20:55
faut changer les id en id1 par exemple
Bravo, ça fait vachement avancer le schmiblick...

Le fait de changer les nombres en lettres ne devrait pas changer l'aspect du site.
Le problème est ailleurs.
Il nous faut le code complet (html + css) ou une url.
0
Azerking Messages postés 977 Date d'inscription jeudi 5 novembre 2009 Statut Membre Dernière intervention 28 mars 2014 187
1 févr. 2010 à 20:57
Si l'erreur vient de l'id, c'est qu'il faut la changer qu'est ce que tu veux faire d'autre?
0
notobe Messages postés 1952 Date d'inscription mercredi 11 novembre 2009 Statut Membre Dernière intervention 8 juillet 2011 213 > Azerking Messages postés 977 Date d'inscription jeudi 5 novembre 2009 Statut Membre Dernière intervention 28 mars 2014
1 févr. 2010 à 21:12
Le validateur grogne car les id sont identifiés avec des nombres. C'est tout.
Ce n'est pas cela qui explique la différence de rendu entre IE et FF.
0
Azerking Messages postés 977 Date d'inscription jeudi 5 novembre 2009 Statut Membre Dernière intervention 28 mars 2014 187
1 févr. 2010 à 21:16
Ah oui j'ai mal lu.Faut tout le fichier là oui.
0
Je vous met le code de la trame :
Site : hotel-napoleon-38.fr
Le pb : sur IE lorsque je mets ma souris sur chambre (par exemple), un sous menu chambre apparrait et me permet d'aller à une autre page html.
Sur firefox ces sous menus n'apparraissent pas ???

Code trame :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html style="direction: ltr;" lang="fr">
<head>
<title>Hôtel Napoléon</title>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<script language="javascript">
function cache(n)
{
document.getElementById(n).style.visibility = 'hidden';
}
function controle(n,pos)
{ document.getElementById(n).style.visibility = 'visible';
document.getElementById(n).style.left = document.body.clientWidth/2-350+pos;
document.getElementById(n).style.top =156; }
var Nblettres=0;
var texte_a_afficher="";
function machine_a_ecrire()
{
var message="Hôtel** NAPOLEON Tous Droits Réservés";
if (Nblettres>message.length)
{
texte_a_afficher=" ";
window.status=" ";
Nblettres=0;
}
texte_a_afficher+=message.substring(Nblettres,Nblettres+1);
window.status=texte_a_afficher;
Nblettres++;
setTimeout('machine_a_ecrire()',250);
}
var Nblettresnap=0;
var texte_Nap="";
function affichagehaut()
{
var message="HOTEL NAPOLEON** ";
if (Nblettresnap>message.length)
{
texte_Nap=" ";
boucletext.innerHTML=" ";
Nblettresnap=0;
}
texte_Nap+=message.substring(Nblettresnap,Nblettresnap+1);
boucletext.innerHTML=texte_Nap;
Nblettresnap++;
setTimeout('affichagehaut()',250);
}
</script>
<style type="text/css">
.sousmenu { text-decoration: none;
font-family: Comic Sans MS;
font-style: normal;
text-transform: none;
text-align: justify;
font-weight: normal;
font-size: xx-small;
color: rgb(255, 255, 255);
}
.sousmenugras { text-decoration: none;
font-family: Comic Sans MS;
font-style: normal;
text-transform: none;
text-align: justify;
font-size: xx-small;
color: rgb(255, 255, 255);
font-weight: bold;
}
.TextNapoleon { font-size: 18pt;
font-family: Comic Sans MS;
color: rgb(51, 51, 255);
font-style: normal;
text-transform: uppercase;
font-weight: bold;
}
.textenormal { color: rgb(0, 0, 0);
text-decoration: none;
font-family: Comic Sans MS;
font-size: small;
font-style: normal;
text-transform: none;
text-align: justify;
font-weight: normal;
}
</style>
</head>
<body onload="machine_a_ecrire();affichagehaut();"
style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"
alink="#66cccc" link="#ffffff" vlink="#66ffff">
<table
style="margin-left: auto; margin-right: auto; text-align: left; width: 52%; background-color: rgb(255, 255, 255);"
bordercolorlight="#3300FF" bordercolordark="#3300FF"
align="center" border="1" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<td style="text-align: right;"
background="Images/Image_haut.jpg" height="94">
<div id="boucletext" style="text-align: left;"
class="TextNapoleon"></div>
<br>
<div align="right"> <br>
<table style="text-align: left; width: 114px; height: 13px;"
border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr style="margin-top: 36px; height: 5px;">
<td style="height: 13px;"><a
href="Accueil.html"><img
style="border: 0px solid ; width: 22px; height: 9px; float: left;"
alt="Français" src="Images/Flag_France.jpg"></a></td>
<td style="height: 13px;"><a
href="English/Welcome.html"><img
style="border: 0px solid ; width: 22px; height: 9px;"
alt="English" src="Images/Flag_UK.jpg"></a></td>
<td style="height: 13px;"><a
href="Deutsch/Willkommen.html"><img
style="border: 0px solid ; width: 22px; height: 9px;"
alt="Deutsch" src="Images/Flag_Germany.jpg"></a></td>
<td style="height: 13px;"><a
href="Poland/bienvenuePl.html"><img
style="border: 0px solid ; width: 22px; height: 9px;"
alt="Poland" src="Images/Flag_Pl.JPG"></a></td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
<tr>
<td style="height: 43px;">
<div id="1"
style="position: absolute; visibility: hidden;"
onmouseout="cache(1)">
<table
onmouseover="document.getElementById(1).style.visibility = 'visible';controle(1,0)"
bgcolor="#3300ff" cellpadding="0" cellspacing="1"
width="120">
<tbody>
<tr>
<td bgcolor="#9999ff">
<table border="0" width="100%">
<tbody>
<tr>
<td height="16"><a href="Accueil.html"
style="color: rgb(255, 255, 255);" class="sousmenu">ACCUEIL</a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div id="2"
style="position: absolute; visibility: hidden;"
onmouseout="cache(2)">
<table
onmouseover="document.getElementById(2).style.visibility = 'visible';controle(2,125)"
bgcolor="#3300ff" cellpadding="0" cellspacing="1"
width="155">
<tbody>
<tr>
<td bgcolor="#9999ff">
<table border="0" width="100%">
<tbody>
<tr>
<td height="16"><a href="Pension.html"
style="color: rgb(255, 255, 255);" class="sousmenu">PENSION</a></td>
</tr>
<tr>
<td height="16"><a
href="Services.html" style="color: rgb(255, 255, 255);"
class="sousmenu">NOS SERVICES</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div id="3"
style="position: absolute; visibility: hidden;"
onmouseout="cache(3)">
<table
onmouseover="document.getElementById(3).style.visibility = 'visible';controle(3,281)"
bgcolor="#3300ff" cellpadding="0" cellspacing="1"
width="143">
<tbody>
<tr>
<td bgcolor="#9999ff">
<table border="0" width="100%">
<tbody>
<tr>
<td height="16"><a
href="Chambres.html" style="color: rgb(255, 255, 255);"
class="sousmenu">CHAMBRES</a> </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div id="4"
style="position: absolute; visibility: hidden; left: -1235px; top: 106px;"
onmouseout="cache(4)">
<table
onmouseover="document.getElementById(4).style.visibility = 'visible';controle(4,423)"
bgcolor="#3300ff" cellpadding="0" cellspacing="1"
width="166">
<tbody>
<tr>
<td bgcolor="#9999ff">
<table border="0" width="100%">
<tbody>
<tr>
<td height="16"><a
href="gastronomie.html" style="color: rgb(255, 255, 255);"
class="sousmenu">GASTRONOMIE
LOCALE</a></td>
</tr>
<tr>
<td height="16"><a
href="Sportsloisirs.html" style="color: rgb(255, 255, 255);"
class="sousmenu">SPORTS
ET LOISIRS</a></td>
</tr>
<tr>
<td height="16"><a
href="Sitesnaturels.html" style="color: rgb(255, 255, 255);"
class="sousmenu">SITES
NATURELS</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div id="5"
style="position: absolute; visibility: hidden;"
onmouseout="cache(5)">
<table
onmouseover="document.getElementById(5).style.visibility = 'visible';controle(5,589)"
bgcolor="#3300ff" cellpadding="0" cellspacing="1"
width="108">
<tbody>
<tr>
<td bgcolor="#9999ff">
<table border="0" width="100%">
<tbody>
<tr>
<td height="16"><a
href="Accesenvoiture.html" style="color: rgb(255, 255, 255);"
class="sousmenu">EN VOITURE</a></td>
</tr>
<tr>
<td height="16"><a href="Parking.html"
style="color: rgb(255, 255, 255);" class="sousmenu">PARKING</a></td>
</tr>
<tr>
<td height="16"><a
href="Accesaeroport.html" style="color: rgb(255, 255, 255);"
class="sousmenu">PAR L'AEROPORT</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<table bordercolorlight="#000000"
bordercolordark="#C0C0C0" bgcolor="#ffffff" border="0"
bordercolor="#ffffff" cellpadding="0" cellspacing="0"
width="100%">
<tbody>
<tr>
<td
style="background: rgb(0, 64, 128) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"
onmouseout="this.style.background='#004080';cache(1)"
onmouseover="this.style.background='#004080';controle(1,0)"
width="20%"><img style="width: 125px; height: 45px;"
alt="" src="Images/Bouton_Accueil.jpg"></td>
<td
style="background: rgb(0, 64, 128) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"
onmouseout="this.style.background='#004080';cache(2)"
onmouseover="this.style.background='#004080';controle(2,125)"
width="20%"><img style="height: 45px; width: 155px;"
alt="" src="Images/Bouton_Prestations.jpg"></td>
<td
style="background: rgb(0, 64, 128) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"
onmouseout="this.style.background='#004080'; cache(3)"
onmouseover="this.style.background='#004080';controle(3,280)"
width="20%"><img style="height: 45px; width: 143px;"
alt="" src="Images/Bouton_Visite_Hotel.jpg"></td>
<td
style="background: rgb(0, 64, 128) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"
onmouseout="this.style.background='#004080'; cache(4)"
onmouseover="this.style.background='#004080';controle(4,423)"
width="20%"><img style="width: 160px; height: 45px;"
alt="" src="Images/Bouton_Activitees.jpg"></td>
<td
style="background: rgb(0, 64, 128) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"
onmouseout="this.style.background='#004080'; cache(5)"
onmouseover="this.style.background='#004080';controle(5,589)"
width="20%"> <img style="height: 45px; width: 110px;"
alt="" src="Images/Bouton_Comment_Venir.jpg"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="background-color: rgb(255, 255, 255);"
height="267">En construction</td>
</tr>
<tr style="font-weight: bold;">
<td style="text-align: center;"
background="Images/Banniere_Bas2.jpg" height="70">
<div style="margin-left: 480px;" class="textenormal"><a
href="mailto:hotelnapoleon@orange.fr">CONTACTEZ NOUS</a><br>
<small><small><small> </small></small></small><br
style="color: rgb(255, 255, 255);">
<span style="color: rgb(255, 255, 255);">hotelnapoleon@orange.fr</span></div>
</td>
</tr>
<tr>
<td><span style="color: rgb(0, 0, 153);"
class="textenormal">©
Hôtel Napoléon Tous Droits
Réservés</span></td>
</tr>
</tbody>
</table>
</body>
</html>
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
Azerking Messages postés 977 Date d'inscription jeudi 5 novembre 2009 Statut Membre Dernière intervention 28 mars 2014 187
1 févr. 2010 à 21:36
J'ai pas vérifier ton code encore, pas le temps ce soir mais moi j'ai un sous menu mais que avec écrit chambre.
0
OK merci, toi tu ne vois pas le défaut, chez toi ça marche mais si tu utilise firefox tu ne pourra pas accéder au sous-menu : il s'affiche mais tu n'a pas la "main" pour valider ton choix.
0
Azerking Messages postés 977 Date d'inscription jeudi 5 novembre 2009 Statut Membre Dernière intervention 28 mars 2014 187
1 févr. 2010 à 21:43
Si si, ça m'amènes a https://hotel-napoleon-38.pagesperso-orange.fr/Chambres.html mais si je clique pas la 1er fois sur chambre le sous menu disparait dès que je veux cliquer dessus.J'essaierai de voir ça demain(si quelqu'un ne le fait pas).
0
Salut,

Confirmez-vous que c'est plus un problème Java que de programmation html ?
Si c'est le cas il faut peut-être cloturer ce post et en recréer un autre.
merci pour votre expertise
0
Azerking Messages postés 977 Date d'inscription jeudi 5 novembre 2009 Statut Membre Dernière intervention 28 mars 2014 187 > tibo
2 févr. 2010 à 13:22
Je m'y connais pas en J.s mais ça n'a pas l'air d'être une erreur html.
0
notobe Messages postés 1952 Date d'inscription mercredi 11 novembre 2009 Statut Membre Dernière intervention 8 juillet 2011 213
1 févr. 2010 à 21:44
Ouch.... :(

En dehors du fait que le code soit... comme du code généré par FrontPage, c'est un problème de javascript.
Et le js, ce n'est pas mon truc.
Désolé, ce n'est pas dans mes compétences...
0
Oui, j'ai aussi utilisé Frontpage pour publier le site.
0