Bonjour,
Afin d'optimiser mon précédent post, je rajoute le source de la page en question
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans nom</title>
<script type="text/javascript">
<!--
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 type="text/css">
<!--
body {
background: white;
margin: 0;
padding: 0;
font: 80% verdana, arial, sans-serif;
}
dl, dt, dd, ul, li {
margin: 00;
padding: 0;
list-style-type: none;
}
#menu {
position: absolute;
top: 100px;
left: 0px;
z-index: 1;
height: 436px;
}
#menu {
width: 199px;
}
#menu dt {
cursor: pointer;
margin: 2px 0;;
height: 40px;
line-height: 20px;
text-align: center;
font-weight: bold;
border: 1px solid gray;
background: #E9A64F;
}
#menu dd {
border: 1px solid gray;
}
#menu li {
text-align: center;
background: #D27A10;
}
#menu li a, #menu dt a {
color: #000;
text-decoration: none;
display: block;
border: 0 none;
height: 100%;
}
#menu li a:hover, #menu dt a:hover {
background: #eee;
}
#haut {
position:absolute;
width:200px;
height:135px;
z-index:5;
}
-->
</style></head>
<body>
<div id="haut"><img src="../images/fond/fond orange.png" width="1050" height="147" /></div>
<dl id="menu" name="menu">
<dt onclick="javascript:montre();"><a href="#"></a></dt>
<dt onclick="javascript:montre();"><a href="#">Communauté de<br />
Communes</a></dt>
<dt onclick="javascript:montre('smenu2');">Marchés Publics</dt>
<dd id="smenu2">
<ul>
<li><a href="#">Sub Menu 2.1</a></li>
<li><a href="#">Sub Menu 2.2</a></li>
<li><a href="#">Sub Menu 2.3</a></li>
</ul>
</dd>
<dt onclick="javascript:montre('smenu3');">Vie économique</dt>
<dd id="smenu3">
<ul>
<li><a href="#">Sub Menu 3.1</a></li>
<li><a href="#">Sub Menu 3.1</a></li>
<li><a href="#">Sub Menu 3.1</a></li>
<li><a href="#">Sub Menu 3.1</a></li>
<li><a href="#">Sub Menu 3.1</a></li>
<li><a href="#">Sub Menu 3.1</a></li>
</ul>
</dd>
<dt onclick="javascript:montre('smenu4');">Tourisme / Loisirs</dt>
<dd id="smenu4">
<ul>
<li><a href="#">Piscine</a></li>
<li><a href="#">Office du tourisme</a></li>
</ul>
</dd>
</dl>
</body>
</html>
Merci pour vos commentaires