







|
|
|
 |
| > La perfection sauf que... |
[ Posté par zonephil ] [ Détails ] [ Contact ] [ Citer ]
[ Posté le 18-01-2004 à 21:45 | 159 messages ]
  Le menu dynamique http://www.editeurjavascript.com/scripts/scripts_nav_12.php est parfait, les bonnes couleurs, lorsque j'enlève la souris le menu ce ferme, j'ai plus aucun problème, sauf un seul qui persiste. Je vous explique. Lorsque je met la souris sur le menu et qu'il ce déroule, il n'est pas égal, il dépasse d'environs deux trois pixels, ces difficile à expliquer, alors je vous est monté une petite image. (Les rond blanc sont ajouté par moi pour vous montrer l'endroit du problème)
Images: http://zonephil.free.fr/ejs.jpg
Mon JavaScripts:
posYmenu = 0;
bgcolor='#E9EAEB';
bgcolor2='#DDE4EB';
needcenter =false;
if(!needcenter)
posXmenu = 0;
else
{ if (document.all)
posXmenu = (document.body.clientWidth/2)-(600/2);
else
posXmenu = (window.innerWidth/2)-(600/2);
}
document.write('<style type="text/css">');
document.write('.popper { POSITION: absolute; VISIBILITY: hidden; z-index:3; }')
document.write('#topgauche { position:absolute; top:'+posYmenu+'px; left:'+posXmenu+'px; z-index:10; }')
document.write('A:hover.ejsmenu {color:#4F4F50; text-decoration:none;}')
document.write('A.ejsmenu {color:#4F4F50; text-decoration:none;}')
document.write('</style>')
if (document.layers)
document.write('<layer class=popper id=topdeck OnMouseOver="focus_over();" OnMouseOut="focus_out();"></layer>');
else
document.write('<DIV class=popper id=topdeck OnMouseOver="focus_over();" OnMouseOut="focus_out();"></DIV>');
zlien = new Array;
zlien[0] = new Array;
zlien[1] = new Array;
zlien[2] = new Array;
zlien[3] = new Array;
zlien[4] = new Array;
zlien[5] = new Array;
zlien[0][0] = '<A HREF="home.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>ACCUEIL</B></FONT></A>';
zlien[0][1] = '<A HREF="map.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>PLAN DU SITE</B></FONT></A>';
zlien[0][2] = '<A HREF="about.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>ABOUT</B></FONT></A>';
zlien[1][0] = '<A HREF="photographies.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>PHOTOGRAPHIES</B></FONT></A>';
zlien[1][1] = '<A HREF="wallpapers.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>WALLPAPERS</B></FONT></A>';
zlien[1][2] = '<A HREF="infographie.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>INFOGRAPHIE</B></FONT></A>';
zlien[1][3] = '<A HREF="webdesign.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>WEBDESIGN</B></B></FONT></A>';
zlien[2][0] = '<A HREF="moi.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>PHOTOS DE MOI</B></FONT></A>';
zlien[2][1] = '<A HREF="profil.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>MON PROFIL</B></FONT></A>';
zlien[2][2] = '<A HREF="albumphotos.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>ALBUM PHOTOS</B></FONT></A>';
zlien[3][0] = '<A HREF="smileys.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>SMILEYS</B></FONT></A>';
zlien[3][1] = '<A HREF="jeux.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>JEUX</B></FONT></A>';
zlien[3][2] = '<A HREF="tuto.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>PHOTO SHOP</B></FONT></A>';
zlien[3][3] = '<A HREF="scripts.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>JAVASCRIPTS</B></FONT></A>';
zlien[4][0] = '<A HREF="forum.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>LE FORUM</B></FONT></A>';
zlien[4][1] = '<A HREF="livredor.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>LE LIVRE D\'OR</B></FONT></A>';
zlien[4][2] = '<A HREF="contact.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>ME REJOINDRE</B></FONT></A>';
zlien[5][0] = '<A HREF="videos.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>VIDÉOS</B></FONT></A>';
zlien[5][1] = '<A HREF="attention.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>AVERTISSEMENTS</B></FONT></A>';
zlien[5][2] = '<A HREF="liens.htm" CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>QUELQUES LIENS</B></FONT></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 = posYmenu+24;
function pop(msg,pos)
{
skn.visibility = "hidden";
a=true
skn.left = posXmenu+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\"><B> "+msg[pass]+"</B></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=600><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"><B>ZONEPHIL</B></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 COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>PORTFOLIO</B></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 COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>WEBMASTER</B></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 COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>DIVERS</B></FONT></a></TD>')
document.write('<TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[4],400)" onMouseOut="this.style.background=\''+bgcolor+'\'"><A onClick="return(false)" onMouseOver="pop(zlien[4],400)" href=# CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>CONTACT</B></FONT></a></TD>')
document.write('<TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[5],500)" onMouseOut="this.style.background=\''+bgcolor+'\'"><A onClick="return(false)" onMouseOver="pop(zlien[5],500)" href=# CLASS=ejsmenu><FONT COLOR="4F4F50" SIZE=1 FACE="Verdana"><B>PLUS !</B></FONT></a></TD>')
document.write('</TR></TABLE></TD></TR></TABLE></DIV>')
if (document.layers)
document.write('</layer>')
else
document.write("</DIV>");
var focus_menu,deuxieme,setattente,delai_disparition_menu=0000;
function attente()
{
if (deuxieme)
{
if (!focus_menu)
{
kill()
}
clearTimeout(setattente);
return;
}
setattente= setTimeout("attente()",delai_disparition_menu);
deuxieme = true;
}
function focus_over()
{
focus_menu = true;
clearTimeout(setattente);
}
function focus_out()
{
focus_menu = false;
deuxieme = false;
attente();
}

________________ PhilDunn
 
|
[ Posté par GhislainLavoie ] [ Détails ] [ Contact ] [ Citer ]
[ Posté le 19-01-2004 à 02:41 | 3179 messages ]
  Salut!
Voici quelque modification a faire pour chacon des éléments du menu (en gras) :
document.write('<TD ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[0],this.offsetLeft)" onMouseOut="this.style.background=\''+bgcolor+'\'"><a onClick="return(false)" onMouseOver="if (nava) pop(zlien[0],this.x-2)" href=# CLASS=ejsmenu><FONT SIZE=2 FACE="Arial"><B> Cours (1/2) </B></FONT></a></TD>')
Donc au lien d'avoir 0,100,200,300 ... ça remplace par l'emplacement exacte.
A+, Ghislain
A+, Ghislain
________________ La clarté est synonyme de bon service...
Soyez explicites avec vos demandes!!!
| [ Posté par zonephil ] [ Détails ] [ Contact ] [ Citer ]
[ Posté le 20-01-2004 à 02:19 | 159 messages ]
  J'ai fait les modification. Il y a eu un changement, mais, les lignes ne sont pas égal, mais par contre, au moins ce sont mes 6 rubrique qui font déscendre le menu qui font descendre à la même place ...
http://zonephil.free.fr/ejs.jpg
regarde sur l'image, ils apparaissent tous de la même facons. Est-ce que sa reste comme sa ou bien il a moyen de faire en sorte que tout soit égal.
________________ PhilDunn
|
|
Services email :
  Vous devez vous identifier pour profiter des services par email du forum.
|

|