[Résolu] Centrer menu javascript

Centrer menu javascript [Résolu] - HTML/CSS - Programmation

Marsh Posté le 19-04-2006 à 12:00:35    

Bonjour à tous,
 
J'ai une page web sur laquelle il y à un menu mais voila le problème: je n'arrive pas à le centrer.
 
La page concernée est la suivante : http://florianarnaud.nonohosting.i [...] rs/aze.htm
 
ET voici le code source :
 
- aze.htm :
 
<html>
<body><center>
<SCRIPT LANGUAGE="JavaScript" SRC="ejs_menu_dyn.js"></SCRIPT>
</body>
</html>
 
 
- ejs_menu_dyn.js :
 
bgcolor='#006699';
bgcolor2='#339999';
document.write('<style type="text/css">');
document.write('.popper { POSITION: absolute; VISIBILITY: hidden; z-index:3; }')
document.write('#topgauche { position:absolute;  z-index:10; }')
document.write('A:hover.ejsmenu {color:#FF9900; text-decoration:none;}')
document.write('A.ejsmenu {color:#FF9900; text-decoration:none;}')
document.write('</style>')
document.write('<div style="position:relative;height:25"><DIV class=popper id=topdeck></DIV>');
/*
SCRIPT EDITE SUR L'EDITEUR JAVACSRIPT
http://www.editeurjavascript.com
*/
 
/*
LIENS
*/
zlien = new Array;
zlien[0] = new Array;
zlien[1] = new Array;
zlien[2] = new Array;
zlien[3] = new Array;
zlien[0][0] = '<A HREF="AnnoncesCables" CLASS=ejsmenu>Cables</A>';
zlien[0][1] = '<A HREF="AnnoncesCartesPCI.php" CLASS=ejsmenu>Cartes PCI</A>';
zlien[0][2] = '<A HREF="AnnoncesLecteursDisquettes.php" CLASS=ejsmenu>Lecteurs de disquettes</A>';
zlien[1][0] = '<A HREF="AnnoncesAPN.php" CLASS=ejsmenu>Appareils Photos Numeriques</A>';
zlien[2][0] = '<A HREF="AnnoncesMP3.php" CLASS=ejsmenu>Lecteurs MP3</A>';
zlien[2][1] = '<A HREF="AnnoncesEcouteurs.php" CLASS=ejsmenu>Ecouteurs Stereo</A>';
zlien[3][0] = '<A HREF="AnnoncesAdaptateursSecteur" CLASS=ejsmenu>Adaptateurs Secteur</A>';
var nava = (document.layers);
var dom = (document.getElementById);
var iex = (document.all);
if (nava) { skn = document.topdeck }
else if (dom) { skn = document.getElementById("topdeck" ).style }
else if (iex) { skn = topdeck.style }
skn.top = 24;
 
function pop(msg,pos)
{
skn.visibility = "hidden";
a=true
skn.left = pos;
var content ="<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR=#000000 WIDTH=150><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=1>";
pass = 0
while (pass < msg.length)
 {
 content += "<TR><TD BGCOLOR="+bgcolor+" onMouseOver=\"this.style.background='"+bgcolor2+"'\" onMouseOut=\"this.style.background='"+bgcolor+"'\" HEIGHT=20><FONT SIZE=1 FACE=\"Verdana\">&nbsp;&nbsp;"+msg[pass]+"</FONT></TD></TR>";
 pass++;
 }
content += "</TABLE></TD></TR></TABLE>";
if (nava)
  {
    skn.document.write(content);
   skn.document.close();
   skn.visibility = "visible";
  }
    else if (dom)
  {
   document.getElementById("topdeck" ).innerHTML = content;
   skn.visibility = "visible";
  }
    else if (iex)
  {
   document.all("topdeck" ).innerHTML = content;
   skn.visibility = "visible";
  }
}
function kill()
{
 skn.visibility = "hidden";
}
document.onclick = kill;
document.write('<DIV ID=topgauche><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR=#000000 WIDTH=400><TR><TD><TABLE CELLPADING=0 CELLSPACING=1 BORDER=0 WIDTH=100% HEIGHT=25><TR>')
document.write('<TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[0],0)" onMouseOut="this.style.background=\''+bgcolor+'\'"><A onClick="return(false)" onMouseOver="pop(zlien[0],0)" href=# CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana">Informatique</FONT></a></TD>')
document.write('<TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[1],100)" onMouseOut="this.style.background=\''+bgcolor+'\'"><A onClick="return(false)" onMouseOver="pop(zlien[1],100)" href=# CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana">Photo</FONT></a></TD>')
document.write('<TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[2],200)" onMouseOut="this.style.background=\''+bgcolor+'\'"><A onClick="return(false)" onMouseOver="pop(zlien[2],200)" href=# CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana">Audio</FONT></a></TD>')
document.write('<TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[3],300)" onMouseOut="this.style.background=\''+bgcolor+'\'"><A onClick="return(false)" onMouseOver="pop(zlien[3],300)" href=# CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana">Electricite</FONT></a></TD>')
document.write('</TR></TABLE></TD></TR></TABLE></DIV></div>')
 
Si quelqu'un pouvait m'aider ...  :)  
 
Merci beaucoup d' avance
 
Flo


Message édité par Flo7516 le 15-04-2007 à 13:33:22
Reply

Marsh Posté le 19-04-2006 à 12:00:35   

Reply

Marsh Posté le 19-04-2006 à 12:08:17    

[:aaah] Tu l'as pécho ou ce truc ?

Reply

Marsh Posté le 19-04-2006 à 12:09:16    

Reply

Marsh Posté le 19-04-2006 à 12:13:36    

T'as trois solutions, ordonnées par préférence :
1 - Tu fais ça toi même, correctement
2 - Tu trouves un script moins pourri que ce truc :o
3 - Tu demandes à l'auteur du script pour centrer ton truc

Reply

Marsh Posté le 19-04-2006 à 12:45:59    

Ok lol, je choisis la seconde solution :)

Reply

Marsh Posté le 19-04-2006 à 12:48:18    

Reply

Marsh Posté le 19-04-2006 à 12:54:48    

Reply

Marsh Posté le 19-04-2006 à 13:15:22    

Merci bien pour le lien ! Problème résolu ! :)

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed