Bonjour,
J'utilise deux exemples de menus pour en créer le mien. Un des deux exemples est celui-ci:
http://css.alsacreations.com/xmedia/exemples/deroulant/cssmenu3.htm

Le problème qui se pose c'est que le sous-menu ("sub menu1", sub menu2"...) apparait dès le chargement de la page. Dans l'exemple, le sous menu n'apparait que lorsque la souris passe au dessus du menu principal ("More Products" dans mon cas).

Que faire pour résoudre ceci ?
Merci à vous.

Voici le code :
(n'y a-t-il pas moyen d'attacher un fichier autre qu'une image à ce message ?)

<html>
<head>
<!-- #BeginEditable "doctitle" -->
<title>Metris Tutorial</title>
<!-- #EndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="Tutorial.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

<!--function MM_findObj(n, d) { //v4.01
<!-- var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
<!-- d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
<!-- if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
<!-- for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
<!-- if(!x && d.getElementById) x=d.getElementById(n); return x;
<!--}

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible' Smiley decu v=='hide')?'hidden':v; }
obj.visibility=v; }
}

window.onload=montre;
function montre(id) {
var d = document.getElementById(id);
for (var i = 1; i<=10; i++) {
if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
}
if (d) {d.style.display='block';}
}
//-->
</script>

<style>
#navlist ul
{
margin-left: 0;
padding-left: 0;
padding-top: 20;
white-space: nowrap;
}

#navlist li
{
display: inline;
list-style-type: none;
}

#navlist a { padding: 3px 10px; }

#navlist a:link, #navlist a:visited
{
color: #0000FF;
text-decoration: none;
}

#navlist a:hover
{
color: #FF3300;
text-decoration: none;
}

#smenu1 LI {
DISPLAY: inline
}

#smenu1 {
CLASS: "text";
LEFT: 0px;
WIDTH: 900px;
POSITION: absolute
}

#smenu1 ul {
margin: 0;
padding-left: 450;
list-style-type: none
}

</style>

</head>

<body bgcolor="#FFFFFF" class="text" onLoad="MM_preloadImages('../images/general/navigation/Nav02Hover.png')">
<table width="726" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="6" background="../images/general/navigation/Nav01.png">&nbsp;</td>
<td width="88" valign="top"><a href="http://www.metris.com" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Nav02Roll','','../images/general/navigation/Nav02Hover.png',1)"><img src="../images/general/navigation/Nav02.png" name="Nav02Roll" width="88" height="80" border="0"></a></td>
<td width="526" valign="middle" background="../images/general/navigation/nav03pxl.png">
<div id="navcontainer">
<ul id="navlist">
<li class="text" id="active"><a href="../Index.htm" id="current">Home</a></li>
<li class="text"><a href="../SCAN/Scan.htm">Scan</a></li>
<li class="text"><a href="#">Scan Offline</a></li>
<li class="text"><a href="../FOCUS_INSP/FocusInsp.htm">Focus Inspection</a></li>
<li class="text"><a href="#">Focus RE</a></li>
<li class="text"><a href="../BASE/base.htm">Base</a></li>
</ul>
</div></td>
<td width="94" valign="middle" background="../images/general/navigation/nav03pxl.png" class="text">
<DIV id=menu>
<DL>
<DT onmouseover="montre('smenu1');"><A href="#">More Products</A>
</DT>
<DD id=smenu1 name="smenu1">
<UL>
<LI><A href="#">Sub Menu 1.1</A>
<LI><A href="#">Sub Menu 1.2</A>
<LI><A href="#">Sub Menu 1.3</A>
</LI>
</UL></DD></DL></div></td>
<td width="12" background="../images/general/navigation/Nav04.png">&nbsp;</td>
</tr>
</table>
<p class="text">&nbsp;</p>
<!-- #BeginEditable "main%20text" -->{main text}<!-- #EndEditable -->
</body>
</html>
[/i][/i][/i][/i][/i][/i]
Bonjour PhilVert et bienvenue sur Alascréations Smiley smile ,

Tu as dû manqué un passage particulèrement apprécié sur le forum: la presentation du code Smiley cligne .

Merci d'avance d'éditer ton post pour présenter lisiblement ton code comme indiqué dans les règles.