Forum de discussion
Forum « Programmation Javascript » (archives)
probleme "centrer menu deroulant" pleaz help
Envoyé: 9 avril 2004, 10h05 par test
j'ai fais un menu deroulant
mais le probleme c'est qu'il est positionné par left:240px; top300px; donc ça conviens pas a toutes les résolutions d'ecrans
donc j'ai voulu virer tout ça et mettre mon menu dans un tablo que je centrerai au milieu dla page trankil avec mes ptits espace entre chaque colones , mais rien ça me tue
ewans18@caramail.com
bon voilà lcode :
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript"><!--
function menu_show() {
for (i=0;i<menu_show.arguments.length;i++) {
document.getElementById(menu_show.arguments[i]).style.visibility='visible';}
}
function menu_hide() {
for (i=0;i<menu_hide.arguments.length;i++) {
document.getElementById(menu_hide.arguments[i]).style.visibility='hidden';}
}
function menu_msg(msg) {
alert(msg);
}
function cible(php_cible,php_target) {
document.feuille.action = php_cible;
// Target _blank => Ouverture dans une nouvelle fenetre internet
document.feuille.target="_self";
if (php_target==1)
{
document.feuille.target="_blank";
}
document.feuille.submit();
}
--></script>
<style type="text/css"><!--
.class1 {position:absolute; left:240px; top300px; width:150px; cursor:hand; visibility:'visible'}
.class2 {position:absolute; left:490px; top300px; width:150px; cursor:hand; visibility:'visible'}
.class3 {position:absolute; left:740px; top300px; width:150px; cursor:hand; visibility:'visible'}
.class4 {position:absolute; left:940px; top300px; width:150px; cursor:hand; visibility:'visible'}
.menu {font-family:'georgia'; font-size:14px; font-weight:normal; background-color:#0099FF; bordercolor:white; color:white;}
.submenu {background-color:#0099FF; font-family:'comic-sans-ms'; font-size:14px; font-weight:normal; color:white; visibility:'hidden';}
A {text-decoration:none; color:white;}
A:hover {background-color:grey; color:#CEC5C5;}
--></style>
</head>
<body>
<form name="feuille">
<hr width=100% align=center >
<div id='div1' class='class1' onmouseover='menu_show("f1","f2","f3","f4","f5")' onmouseout='menu_hide("f1","f2","f3","f4","f5")'>
<table ><tr><td class='menu'> <center><b>Afficher</center></td></tr>
<tr><td id='f1' class='submenu'><a href="index.phtm?page=serviceplan">
<center>Planning du Service</center></a></td></tr>
<tr><td id='f2' class='submenu'>
<a href="index.phtm?page=etatconges"><center>Etat de mes Congés</center></a></td></tr>
<tr><td id='f3' class='submenu'>
<a href="index.phtm?page=listconges"><center>Liste de mes Congés</center></a></td></tr>
<tr><td id='f4' class='submenu'>
<a href="javascript:window.print()">Imprimer page courante</a>
<tr><td id='f5' class='submenu'>
<a href="javascript:opener=self;self.close();">
<center>Quitter</a></td></tr>
</table>
</div>
</td>
<div id='div2' class='class2' onmouseover='menu_show("t1","t2","t3")' onmouseout='menu_hide("t1","t2","t3")'>
<table ><tr><td class='menu'><center><b> Faire une Demande</center> </td></tr>
<tr><td id='t1' class='submenu'>
<a href="index.phtm?page=editfiche"><center>chapter1</center></a></td></tr>
<tr><td id='t2' class='submenu'>
<a href="index.phtm?page=editspec"><center>chapter2</center></a></td></tr>
<tr><td id='t3' class='submenu'>
<a href="index.phtm?page=editrtt"><center>chapter3</center></a></td></tr>
</table>
</div>
<div id='div3' class='class3' onmouseover='menu_show("z1","z2")' onmouseout='menu_hide("z1","z2")'>
<table >
<tr><td class='menu'><center><b>Aide</center></td></tr>
<tr><td id='z1' class='submenu'>
<a href=""><center><center>Utilisation<br> Intranet Congés</a></td></tr>
<tr><td id='z2' class='submenu'>
<a href=""><center>Envoyer un Mail<br>au Support Intra</a></td></tr>
</table>
</div>
<div id='div4' class='class4' onmouseover='menu_show("y1","y2","y3")' onmouseout='menu_hide("y1","y2","y3")'>
<table >
<tr><td class='menu'><center><b>Liens</center></td></tr>
<tr><td id='y1' class='submenu'>
<A HREF='meteo'><center>Météo</center></a></td></tr>
<tr><td id='y2' class='submenu'>
<A HREF=''><center>Home Intra</center></a></td></tr>
<tr><td id='y3' class='submenu'>
<A HREF=''><center>Home </center></a></td></tr></table></div></form></body></html>
-------------------------------------
in Prog we trust
Réponses
|