Salut Chmel!!
Merci d'avoir pris le temps de t'etre penché sur mon cas.
Je m'arrache les cheveux!!
j'ai essayé la methode en js mais je suis trop novice dans tout ca pour reelement comprendre quelque chose....Peux tu m'aider ?
Alors dans mon dossier j'ai une page index.php, menu.htm et style.css.
C'est vraiment important, j'y suis depuis quelques semaines dessus
. MERCI pour vos aides!!!Et encore merci Chmel
j'en suis a la :
index.php code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<style type="text/css">
<!--
body {
background-color: #000000;
}
.Style4 {color: #FF0000}
.Style5 {font-family: Arial, Helvetica, sans-serif}
.Style6 {font-size: 10px}
.Style9 {
font-size: 10px;
font-family: Arial, Helvetica, sans-serif;
color: #FF0000;
}
.Titre {font-family: Arial, Helvetica, sans-serif; font-size: 10px;}
.Style11 {color: #9D0000}
.Style22 {font-size: 16}
-->
</style>
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.Style24 {
color: #666666;
font-weight: bold;
}
.Style25 {color: #FFFFFF}
.Style26 {
color: #666666;
font-family: Tahoma;
}
-->
</style>
</head>
<body>
<table width="836" border="0" cellpadding="0" cellspacing="0" class="block">
<!--DWLayoutTable-->
<tr>
<td width="20" height="5"></td>
<td width="797"></td>
<td width="19"></td>
</tr>
<tr>
<td height="465"></td>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<!--DWLayoutTable-->
<tr>
<td height="14" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="292627">
<!--DWLayoutTable-->
<tr>
<td width="797" height="14" valign="top" bgcolor="#292627" class="top"><!--DWLayoutEmptyCell--> </td>
</tr>
</table></td>
</tr>
<tr>
<td width="200" height="451" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#9d9694">
<!--DWLayoutTable-->
<tr>
<td width="186" height="451" valign="top">
<div class="menu" align="left">
<?php
include("menu.htm");
?>
</div></td>
<td width="14" valign="top"><div align="right"></div></td>
</tr>
</table></td>
<td width="597" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="597" height="451" align="left" valign="top" class="Style22">
<div class="frame" align="left">
<?php
if (!isset($_GET['page'])) $page= 'conteneur'; else $page= $_GET['page'];
switch($page)
{
/*Menu gauche*/
case 'menu': include ('menu.htm');break;
}
?>
</div>
<div align="left"></div></td>
</tr>
</table></td>
</tr>
</table></td>
<td></td>
</tr>
<tr>
<td height="14"></td>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#292627">
<!--DWLayoutTable-->
<tr>
<td width="797" height="14"></td>
</tr>
</table></td>
<td></td>
</tr>
<tr>
<td height="54"></td>
<td> </td>
<td></td>
</tr>
</table>
</div>
</body>
</html>
Code pour la page menu.html qui est include dans index.php
<head>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript"><!--
document.write('<'+'style type="text/css" media="screen, projection"><!--');
document.write('dl#menu dd { display: none; }');
document.write('--><'+'/style>');
//--></script>
<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>
<title>Document sans nom</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<dl id="menu" name="nav">
<dt onclick="javascript:montre();"><a href="#"><strong>Browse by Category</strong></a></dt>
<dt onclick="javascript:montre('smenu1');">>Menu2</dt>
<dd id="smenu1">
<ul>
<li><a href="#">item1</a></li>
<li><a href="#">item2</a></li>
<li><a href="#">item3</a></li>
<li><a href="#">item4</a></li>
</ul><br>
</dd>
<dt onclick="javascript:montre('smenu2');">>Menu2</dt>
<dd id="smenu2">
<ul>
<li><a href="#">item1</a></li>
<li><a href="#">item2</a></li>
</ul>
</dd>
</dl>
</body>
</html>
Et le code Css:
/* CSS Document */
<style type="text/css" media="screen">
body {
margin: 0;
padding: 0;
font-family:Arial, Helvetica, sans-serif;
font-size:10px;
background-color:#9d9694;
}
dl, dt, dd, ul, li {
margin: 0;
padding: 0;
list-style-type: none;
}
#menu {
position:relative;
top: 0;
left: 0;
font-family:Arial, Helvetica, sans-serif;
width: 15em;
background-color:#9d9694;
}
#menu {
}
/* Modifications sur Grand titre */
#menu dt {
cursor: pointer;
font-family:Arial, Helvetica, sans-serif;
font-size:11px;
color:#333333;
font-weight: none;
background: #9d9694; /* Modifications couleur background Grand titre */
}
#menu dd {
font-family:Arial, Helvetica, sans-serif;
}
/* Modification sous menu */
#menu li {
font-family:arial;
line-height: 15px;
font-size:11px;
margin-left: 25px;
color:#333333;
text-decoration:none;
background-color:#9d9694;
}
#menu li a, #menu dt a {
color: #333333; /* Modifications couleur texte sous menu */
text-decoration: none;
height: 100%;
}
#menu li a:hover, #menu dt a:hover {
background: none;
}
.menu{
margin-left: 20px;
background-color:#9d9694;
}
.frame{
margin-left: 0px;
margin-top: 20px;
}
.t3{
font-family:arial;
color:#333333;
font-size:11px;
text-decoration:underline
}
.t4{
font-family:arial;
color:#666666;
font-size:11px;
text-decoration:underline
}
</style>