menu deroulant ne depasse pas le div
bonjour a tous,
j'ai 3 problèmes avec mon menu déroulant :
1/
il est inclus dans mon header,
mon header fait (par exemple) 100px de haut,
mon menu déroulant, une fois déroulé, fait (par exemple) 150px =>
résultat, je ne peux cliquer que sur les 100 premiers pixels ... quand je descend plus bas, je perds mon menu déroulant ...!
voici la feuille complète pour se faciliter la vie ;)
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228
|
<!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>
<link rel="SHORTCUT ICON" href="images/zugicon.ico" ;="">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<meta name="Description" content="" >
<meta name="keywords" content="" >
<meta name="language" content="fr" >
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/JavaScript">
<!--
window.onload=montre2;
function montre2(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';}
}
<!--<dd style="display: none;" id="smenu1" onmouseover="javascript:montre2('smenu1');" onmouseout="javascript:montre2();">-->
-->
</script>
<style type="text/css">
<!--
body {
padding: 0;
margin: 0;
text-align: center;/**/
background-image:url(../images/images_site/fond-2010.jpg);/**/
background-repeat:no-repeat;
background-position: center top;
/*background-color:#19564E;*/
font-family: Arial, Helvetica, sans-serif;
}
#header{
border: 1px solid red;/**/
position:relative;
margin-left: auto;
margin-right: auto;
width:950px;
height:143px;
background-image:url(../images/images_site/bandeau2-2010.png);/* */
text-align: left;
}
#global{
border: 1px solid red;/**/
position:relative;
margin-left: auto;
margin-right: auto;
width: 950px;
text-align: left;
min-height:600px;
}
#menu_gauche{
border: 1px solid red;/**/
float:left;
position:relative;
width: 120px;
height:395px;
text-align: left;
}
#page_principale a{color:#E3DCC2; }
#page_principale{
border: 1px solid red;/**/
/*float:left;*/
color:#E3DCC2;
margin-left:140px;
position:relative;
left:0px;
width:790px;
height:630px;
overflow:auto;/**/
/*text-align: left;*/
}
#onglets{
/*float:right;*/
position:relative;
width: 650px;
/*height:155px;*/
top:100px;/**/
margin-left:350px;
text-align: center;
font-weight:bold;
}
#footer{
border: 1px solid red;/**/
position:relative;
width: 950px;
height:80px;
clear:both;
text-align: left;
}
/*---------------------partie ligne sup : le menu-----------*/
#menuDeroulant
{
background: #5B1900;/* fond couleur de la barre entiere sup*/
width: 600px;
height: 30px;
list-style-type: none;/* afficher ou non les points*/
margin: 0;
padding: 0;
border: 0;
position: absolute;/*bloquee en haut*/
top: 0;/*en rapport avec absolut*/
left: 0;/*en rapport avec absolut*/
}
#menuDeroulant li
{
float: left;
width: 150px;/*taille chaque menu*/
margin: 0;
padding: 0;
border: 0;
}
#menuDeroulant li a:link, #menuDeroulant li a:visited
{
display: block;/*100% du background*/
height: 1%;
color: #E3DCC2;/*texte menu*/
/*background: #3B4E77;*/
margin: 0;
padding: 5px 8px;/*agrandir hauteur, largeur*/
border-right: 1px solid #E3DCC2;
border-left: 1px solid #E3DCC2;
text-decoration: none;/*souligné ou pas*/
}
#menuDeroulant li a:hover { background-color: #000; }/*au survol*/
#menuDeroulant li a:active { background-color: #000; }/*apres visite*/
/*partie lignes inf : le sous-menu*/
#menuDeroulant .sousMenu
{
display: none;/*cacher tant que ce n'est pas survolé*/
list-style-type: none;/*aff boutons*/
margin: 0;
padding: 0;
border: 0;
text-align:left;
}
#menuDeroulant .sousMenu li
{
float: none;
margin: 0;
padding: 0;
border: 0;
width: 150px;
background-color: #5B1900;
border-top: 1px solid transparent;
border-right: 1px solid transparent;
}
#menuDeroulant .sousMenu li a:link, #menuDeroulant .sousMenu li a:visited
{
display: block;
color: #E3DCC2;
margin: 0;
border: 0;
text-decoration: none;
/*background: transparent url("fondTR.png") repeat;option aff image fond*/
}
#menuDeroulant .sousMenu li a:hover
{
background-image: none;
background-color: #000;
}
#menuDeroulant li:hover > .sousMenu { display: block; }/*sinon, on voit pas sous-menu*/
-->
</style>
<title> Bienvenue </title>
</head>
<noscript><h2 align="center">Activez Javascript, il est necessaire pour ce site !<h2></noscript>
<!--[if lt IE 7]> <h2>l'affichage sera bien mieux avec une version plus recente de internet explorer ou bien avec firefox</h2><![endif]-->
<div id="header">
<div id="onglets">
<ul id="menuDeroulant"> <!-- -->
<li><a href="index.php">Accueil</a></li>
<li><a href="catalogue_realisations.php">Réalisations</a>
<ul class="sousMenu">
<li><a href="produits.php?cat=1"> Constructions</a></li>
<li><a href="produits.php?cat=2"> Sites Web</a></li>
<li><a href="produits.php?cat=3"> Atelier</a></li>
<li><a href="produits.php?cat=4"> Autres</a></li>
<li><a href="produits.php?cat=4"> essai</a></li>
</ul>
</li>
<li><a href="liens.php">Liens</a></li>
<li><a href="contact.php">Contact</a></li>
</ul>
</div>
</div>
<div id="global">
<div id="menu_gauche">
Dimanche 30 mai 2010
<br><br><b>Dernière réalisation :</b><br>
<a href="detail_produit.php?num=9&numoption=52" border="0" title="renovation-chambre-09-01.jpg"><img src="images/images_produits/vignettes/renovation-chambre-09-01.jpg"
title="voir la derniere réalisation" width="80" border="1"></a>
</div>
<!--<div id="menu_droite">
<br>
MENU DROITE
</div>-->
<div id="page_principale">
<br><br>
<h3 align="center">Bienvenue<br/>
Vous pouvez accéder à mes réalisations<br>
en cliquant sur l'image en dessous<br/></h3><br/><br/>
<div align="center">
<br><a href="catalogue_realisations.php" title="Le catalogue des réalisations">
<img src="images/images_produits/08-10-10-portail_avant-reparation.jpg" width="350" /></a>
<br/>Une réalisation au hasard !
</div>
</div><!--principal-->
<div id="footer">
<!----><p style="padding-top:20px;" align="center">
<span style="padding-left:100px;"></span></p>
</div>
</div><!--global-->
</body>
</html> |
2/
le 2ieme soucis(moins problématique , quand même), c'est que le menu déroulant ne recouvre pas les textes qui sont dessous(on comprends mieux en essayant avec ma page d'essai...) , donc, c'est pas très lisible ...
3/
le troisième problème .....IE6, bien sur....
ça ne fonctionne pas avec.... alors, j'ai un script(visible sur la page test)...
la question est : comment puis-je l'adapter a ce type de menu?
avec un "if...endif", d'accord, mais c'est plutôt :
le script est adapté a un menu "dd" et je voudrais le configurer pour ce
"#menuDeroulant .sousMenu "
voila donc .....
ça fait pas mal de questions, d'accord ..... !!
mais c'est surtout qu'après, il me servira pour d'autres sites...
alors merci d'avance !! :mrgreen::mrgreen: