FORUM Tom's Hardware » Programmation » HTML / Javascript » Menu dynamique verticale
 

Menu dynamique verticale

Il y a 309 utilisateurs connus et inconnus. Pour voir la liste des connectés connus, cliquez ici
Ajouter une réponse



C bien les sondages ?


 
100.0 %
 2 votes
1.  Oui
 
 
0.0 %
        0 vote
2.  Non
 

Total : 3 votes (1 vote blanc)
Ce sondage est clos, vous ne pouvez plus voter
 Mot :   Pseudo :  
 
Bas de page
Auteur
 Sujet : Menu dynamique verticale
 
J'transforme mes maux en mots ...
Plus d'informations

Lu tout le monde !  
J'ai un probleme avec un script de menu déroulant verticale . Je rentre le code :
<style type="text/css">
<!--
a.bi{
background-color:orange;
color:#ffffff;
display:block;
font-family: MS Sans Serif,sans-serif;
font-size:8pt;
font-weight:bold;
padding:3px 3px 3px 3px;
text-decoration:none;
border-color: #225555 #000000 #000000 #225555;
border-style:solid;
border-width:2px;
}
a.bi:hover{
background-color:#f8f8f8;
color:orange;
}
a.mi{
background-color:orange;
color:#ffffff;
display:block;
font-family:MS Sans Serif,sans-serif;
font-size:8pt;
font-weight:bold;
padding: 2px 2px 2px 4px;
text-decoration:none;
}
a.mi:hover{
background-color:#f8f8f8;
color:orange;
}
.mn{
background-color:orange;
border-color: #225555 #000000 #000000 #225555;
border-style:solid;
border-width:2px;
z-index:100;
}
.sp{
BORDER-TOP:#000000 1px solid;
MARGIN:2px;
BORDER-BOTTOM:#225555 1px solid
}
//-->
</style>
<!--paste above inbetween your head tags-->
<!--Past below inbetween your body tags-->
<script language="JavaScript">
<!--//
var D6=window,Y7=document;function B8(){this.ver=navigator.appVersion;this.agent=navigator.userAgent;this.dom=Y7.getElementById?1:0;this.opera5=this.agent.indexOf("Opera 5" )>-1;this.ie5=(this.ver.indexOf("MSIE 5" )>-1 && this.dom && !this.opera5)?1:0;this.ie6=(this.ver.indexOf("MSIE 6" )>-1 && this.dom && !this.opera5)?1:0;this.ie4=(Y7.all && !this.dom && !this.opera5)?1:0;this.ie=this.ie4||this.ie5||this.ie6;this.mac=this.agent.indexOf("Mac" )>-1;this.ns6=(this.dom && parseInt(this.ver)>=5)?1:0;this.ns4=(Y7.layers && !this.dom)?1:0;this.bw=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5);return this}bw=new B8();z=0;b=0;g="";if(bw.opera5||bw.ns6){b=2};if(bw.ie){g=" style='width: 100%'"}else{z=6}mt=10;ml=10;w=129;mh=23;mw=ml-w;k=0;mt=mt-z;p="<a class='mi'"+g+" href='";q="' title='";r="\"; return true' onmouseout='window.status=\"\"; return true'target=blank>";t="</a>";a="' onmouseover='window.status=\"";v="<div class=sp></div>"
m=new Array();n=new Array();s=new Array();sw=new Array();su=new Array();st=new Array()
m[0]='Photos';n[0]='#';sw[0]=120;su[0]='Photos';st[0]="";s[0]=""
+p+"page.html"+q+a+"Brunes"+r+"Brunes"+t
+p+"page.html"+q+a+"Blondes "+r+"Blondes "+t
+p+"page.html"+q+a+""+r+""+t
+p+"page.html"+q+a+""+r+""+t
m[1]='';n[1]='#';sw[1]=140;su[1]='';st[1]="";s[1]=""
+p+"page.html"+q+a+""+r+""+t
+p+"page.html"+q+a+""+r+""+t
+p+"page.html"+q+a+""+r+""+t
+p+"page.html"+q+a+""+r+""+t
m[2]='';n[2]='#';sw[2]=130;su[2]='';st[2]="";s[2]=""
+p+"page.html"+q+a+""+r+""+t
+p+"page.html"+q+a+""+r+""+t
+p+"page.html"+q+a+""+r+""+t
+p+"page.html"+q+a+""+r+""+t
ma=m.length
if (k==1) {mw2=ml-w;
for (i=0; i < ma; i++){document.write("<div id='sb"+i+"' class='mn' style='position: absolute; top:"+(mt+mh)+";left:"+(mw+=w+2)+";width:"+(sw[i]-b)+"' onmouseover='o["+i+"].showIt()' onmouseout='o["+i+"].hideIt()'>"+s[i]+"</div>" )}
for (i=0; i < ma; i++){document.write("<div style='position: absolute; top:"+mt+";left:"+(mw2+=w+2)+";width:"+w+"' onmouseover='o["+i+"].showIt()' onmouseout='o["+i+"].hideIt()'><a class='bi'"+g+" href='"+n[i]+q+st[i]+a+su[i]+r+m[i]+t+"</div>" )}}
else {mw2=mt-mh;mt2=mt-mh+2
for (i=0; i < ma; i++){document.write("<div id='sb"+i+"' class='mn' style='position: absolute; top:"+(mt2+=(mh+1))+";left:"+(ml+w-10)+";width:"+sw[i]+"' onmouseover='o["+i+"].showIt()' onmouseout='o["+i+"].hideIt()'>"+s[i]+"</div>" )}
for (i=0; i < ma; i++){document.write("<div style='position: absolute; top:"+(mw2+=(mh+1))+";left:"+ml+";width:"+w+"' onmouseover='o["+i+"].showIt()' onmouseout='o["+i+"].hideIt()'><a class='bi'"+g+" href='"+n[i]+q+st[i]+a+su[i]+r+m[i]+t+"</div>" )}}
function lib_obj(obj,nest){nest=(!nest) ? "":'document.'+nest+'.';this.evnt=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+"document.layers." +obj):0;this.css=bw.dom||bw.ie4?this.evnt.style:this.evnt;this.ref=bw.dom||bw.ie4?document:this.css.document;this.x=parseInt(this.css.left)||this.css.pixelLeft||this.evnt.offsetLeft||0;this.y=parseInt(this.css.top)||this.css.pixelTop||this.evnt.offsetTop||0;return this}
function lib_doc_size(){this.x=0;this.x2=bw.ie && document.body.offsetWidth-20||innerWidth||0;this.y=0;this.y2=bw.ie && document.body.offsetHeight-5||innerHeight||0;this.x50=this.x2/2;this.y50=this.y2/2;return this;}
lib_obj.prototype.showIt = function(){this.css.visibility="visible"}
lib_obj.prototype.hideIt = function(){this.css.visibility="hidden"}
function libinit(){page=new lib_doc_size();o=new Array();for (i=0; i < ma; i++){o[i]=new lib_obj('sb'+i);o[i].hideIt()}}
libinit()
//-->
</script>
 
 
Mon probleme c'est que le menu dynamique ne se place pas ou je veux . Le script est bien a l'endroit désiré mais quand je fait apercu le menu se trouve tout en haut a gauche de mon site  
Quelqu'un aurait une explication svp ?  
 
PS : ca me fait ca pour tous les scripts de menu dynamique verticale


---------------
Tophelopez

avatar a changer.. un jour...
Plus d'informations

balises [ code ] [ / code ] bourdel :fou:

J'transforme mes maux en mots ...
Plus d'informations

heu.....pas compris dsl


---------------
Tophelopez
avatar a changer.. un jour...
Plus d'informations

Jaz@IDN a écrit :

heu.....pas compris dsl


edite ton message pour mettre ton code entre des balises "[ code ]" et "[ / code ]" (sans les " et les espaces)
ca facilite grandement la lecture en evitant par exemple que

Code :
  1. background-color:orange;

s'affiche avec un smiley :o
 
profites-en aussi pour mettre un peu le code en forme histoire qu'il soit plus lisible (retour a la ligne apres ";" par exemple...)


Message édité par Baster le 24-06-2005 à 11:19:29
J'transforme mes maux en mots ...
Plus d'informations

a dsl premiere fois ke je vien sur ce forum  
 
Bon sinon kelkun a une idée pour m'aider svp ?


---------------
Tophelopez
avatar a changer.. un jour...
Plus d'informations

Edite ton message pour rajouter les balise code :
http://forum.presence-pc.com/messa [...] formulaire
 
Profites-en pour rendre ton code plus lisible
 
Ensuite peut-etre des gens repondront :)

Inside my own Second Life

Chester06 >> Et évite de cliquer n'importe où -> http://forum.presence-pc.com/themes_static/images_forum/1/newsujet.gif
 

sebfinck a écrit :

profites-en aussi pour mettre un peu le code en forme histoire qu'il soit plus lisible (retour a la ligne apres ";" par exemple...)


Et un espace après les ":" et les ";" (ne serait-ce que pour toi ;)).. Par exemple :

Code :
  1. background-color: orange;

 
:jap:


---------------
Retrouvez moi sur mon blog : http://www.nicolasullern.net/leblog/
Et aussi sur :
http://www.linkedin.com/in/nicolasullern
http://www.viadeo.com/fr/profile/nicolas.ullern
http://www.copaing.net/johanpirlouit/
Profil : Pointeur
Plus d'informations

et vires moi ce javascript pour le menu :o
 
http://css.maxdesign.com.au/listamatic/


---------------
Da Bidz Triad©®™: Bidz Interceptor
.:: Smileyz version 4.2 [050625]::. -- Code source disponible sous licence GPL.
[u

Aller à :
Ajouter une réponse
  FORUM Tom's Hardware » Programmation » HTML / Javascript » Menu dynamique verticale
 

Annonces Google
Publicité