Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
711 connectés 

  FORUM HardWare.fr
  Programmation
  HTML/CSS

  Menu horizontal depliant en CSS : Bug sous IE7

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Menu horizontal depliant en CSS : Bug sous IE7

n°1832283
Yekhen
Posté le 29-12-2008 à 18:33:38  profilanswer
 

Bonjour,
 
je viens vous demander de l'aide car j'ai un soucis avec un menu horizontal en CSS sur plusieurs niveaux (dépliant au passage de la souris). Celui-ci fonctionne très bien sous IE6 et FF, en revanche, il ne se déplie pas sous IE7 et je ne trouve pas d'où pourrait venir le problème !
 
Voici le menu :
 

Code :
  1. <div class="menu_hor">
  2. <ul>
  3. <li style="width:200px"><a href="#">LIEN 1<!--[if IE 7]><!--></a><!--<![endif]-->
  4. <!--[if lte IE 6]><table><tr><td><![endif]-->
  5. <ul style="width:755px">
  6.  <li style="width:150px"><a class="sub" href="#" title="">LIEN 1.1<!--[if IE 7]><!--></a><!--<![endif]-->
  7.   <!--[if lte IE 6]><table><tr><td><![endif]-->
  8.   <ul class="left_side" style="width:302px">
  9.    <li style="width:150px"><a href="#" title="Le concept">Le concept</a></li>
  10.    <li style="width:150px"><a href="moyens.php" title="Mise en oeuvre">Mise en oeuvre</a></li>
  11.   </ul>
  12.   <!--[if lte IE 6]></td></tr></table></a><![endif]-->
  13.  </li>
  14.  <li style="width:150px"><a class="sub" href="#" title="">LIEN 1.2<!--[if IE 7]><!--></a><!--<![endif]-->
  15.   <!--[if lte IE 6]><table><tr><td><![endif]-->
  16.   <ul class="right_side" style="width:906px">
  17.    <li style="width:150px"><a href="approche_globale.php" title="Approche globale">Approche globale</a></li>
  18.    <li style="width:150px"><a href="notice_verte_generale.php" title="Notice verte générale">Notice verte générale</a></li>
  19.    <li style="width:100px"><a href="diagrammes.php" title="Diagrammes">Diagrammes</a></li>
  20.    <li style="width:150px"><a href="init.php" title="Notices vertes détaillées">Notices vertes détaillées</a></li>
  21.    <li style="width:200px"><a href="b_ecologique.php" title="Barème des actions écologiques">Barème des actions écologiques</a></li>
  22.    <li style="width:150px"><a href="axe_ecoclassement.php" title="Eco-classement">Eco-classement</a></li>
  23.   </ul>
  24.   <!--[if lte IE 6]></td></tr></table></a><![endif]-->
  25.  </li>
  26.  <li style="width:150px"><a class="sub" href="#" title="">LIEN 1.3<!--[if IE 7]><!--></a><!--<![endif]-->
  27.   <!--[if lte IE 6]><table><tr><td><![endif]-->
  28.   <ul class="right_side" style="width:303px;left:302px;">
  29.    <li style="width:100px"><a href="notice_verte_co2.php" title="CO2">CO2</a></li>
  30.    <li style="width:100px"><a href="notice_verte_producteur.php" title="Algues vertes">Algues vertes</a></li>
  31.    <li style="width:100px"><a href="#" title="Carburant vert">Carburant vert</a></li>
  32.   </ul>
  33.   <!--[if lte IE 6]></td></tr></table></a><![endif]-->
  34.  </li>
  35.  <li style="width:150px"><a class="sub" href="#" title="">LIEN 1.4<!--[if IE 7]><!--></a><!--<![endif]-->
  36.   <!--[if lte IE 6]><table><tr><td><![endif]-->
  37.   <ul class="left_side" style="left:453px; width:150px">
  38.    <li style="width:100px"><a href="#" title="Carburant vert">Carburant vert</a></li>
  39.   </ul>
  40.   <!--[if lte IE 6]></td></tr></table></a><![endif]-->
  41.  </li>
  42.  <li style="width:150px"><a class="sub" href="#" title="">LIEN 1.5<!--[if IE 7]><!--></a><!--<![endif]-->
  43.   <!--[if lte IE 6]><table><tr><td><![endif]-->
  44.   <ul class="left_side" style="width:404px;left:351px;">
  45.    <li style="width:100px"><a href="#" title="Missions vertes">Missions vertes</a></li>
  46.    <li style="width:100px"><a href="#" title="Biomissions">Biomissions</a></li>
  47.    <li style="width:100px"><a href="#" title="Ecomissions">Ecomissions</a></li>
  48.    <li style="width:100px"><a href="#" title="Calendrier">Calendrier</a></li>
  49.   </ul>
  50.   <!--[if lte IE 6]></td></tr></table></a><![endif]-->
  51.  </li>
  52. </ul>
  53. <!--[if lte IE 6]></td></tr></table></a><![endif]-->
  54. </li>
  55. <li style="width:200px"><a href="ecologique.php">LIEN 2<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li>
  56. <li style="width:200px"><a href="structure.php">LIEN 3<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li>
  57. <li style="width:200px"><a href="#">LIEN 4<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li>
  58. <li style="width:200px"><a href="versionning.php">LIEN 5<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li>
  59. </ul>
  60. </div>


 
Et la partie CSS correspondante est la suivante :
 

Code :
  1. .menu_hor {font-family: arial, sans-serif;  height:30px; position:relative; margin:0; font-size:11px; margin:20px 0 10px 0; background:transparent; position:relative; z-index:100;}
  2. .menu_hor ul {padding:0; margin:0; list-style-type: none;}
  3. .menu_hor ul li {float:left; border-left:1px solid #87C720;}
  4. .menu_hor ul li a, .menu_hor ul li a:visited {display:block; text-decoration:none; padding:0 0 0 5px; height:30px; line-height:30px; color:#000; background:#FDFF42 url(images/drop.gif) bottom right no-repeat;}
  5. .menu_hor table {border-collapse:collapse; margin:0; padding:0; font-size:1em;}
  6. .menu_hor ul li ul {visibility:hidden; position:absolute; top:30px; left:0; }
  7. .menu_hor ul li:hover a,
  8. .menu_hor ul li a:hover {color:#fff; background:#525E04;}
  9. .menu_hor ul li:hover ul,
  10. .menu_hor ul li a:hover ul {visibility:visible; width:1030px;background:transparent; color:#fff;}
  11. .menu_hor ul li:hover ul.right_side li,
  12. .menu_hor ul li a:hover ul.right_side li {float:right; border:0; border-left:1px solid #eee;}
  13. .menu_hor ul li:hover ul.left_side li,
  14. .menu_hor ul li a:hover ul.left_side li {float:left; border:0; border-left:1px solid #eee;}
  15. .menu_hor ul li:hover ul li a.sub,
  16. .menu_hor ul li a:hover ul li a.sub {background:#525E04 url(images/drop2.gif) bottom right no-repeat; color:#fff;}
  17. .menu_hor ul li:hover ul li ul,
  18. .menu_hor ul li a:hover ul li a ul {visibility:hidden; position:absolute; left:0; top:30px; }
  19. .menu_hor ul li:hover ul li a,
  20. .menu_hor ul li a:hover ul li a {display:block; background:#005491; color:#fff;}
  21. .menu_hor ul li:hover ul li a:hover,
  22. .menu_hor ul li a:hover ul li a:hover {background:#7E8F08; color:#000;}
  23. .menu_hor ul li:hover ul li:hover ul,
  24. .menu_hor ul li a:hover ul li a:hover ul {visibility:visible; color:#000; background:#7E8F08;}
  25. .menu_hor ul li:hover ul.right li {float:right;}
  26. .menu_hor ul li:hover ul li:hover ul li a,
  27. .menu_hor ul li a:hover ul li a:hover ul li a {background:#7E8F08; color:#000;}
  28. .menu_hor ul li:hover ul li:hover ul li a:hover,
  29. .menu_hor ul li a:hover ul li a:hover ul li a:hover {background:#383F04; color:#fff;}


 
Je m'arrache les cheveux et ne trouve pas la solution. J'espère pouvoir trouver une solution à mon problème avec votre aide car je commence à desesperer  :(  
 
En vous remerciant par avance de votre aide, je vous souhaite une agréable journée/soirée suivant l'heure à laquelle vous lirez ce message ;)

mood
Publicité
Posté le 29-12-2008 à 18:33:38  profilanswer
 

n°1832698
SeRiaL-
Posté le 30-12-2008 à 23:24:53  profilanswer
 

Hello
 
J'ai rarement vu un code aussi immonde..
Mais déjà, ce serait plus facile si tu postais un lien
 
Si t'es intéressé par un menu de qualité (code propre, accessibilité, quelques fonctionnalités intéressantes), utilise le menu Superfish (jQuery nécessaire)  
http://users.tpg.com.au/j_birch/pl [...] /#examples

n°1837771
PIerrotW
Posté le 14-01-2009 à 12:40:45  profilanswer
 

Salut, tu peux également récupérer mon menu déroulant (HTML + CSS).
C'est un mix de plusieurs menus trouvés sur le web.
 
Fichier HTML = Voir le code source de : http://pierre.warnez.perso.neuf.fr
Le CSS = http://pierre.warnez.perso.neuf.fr/Style.css.
 
Si tu as des questions, utilise le formulaire de contact : http://pierre.warnez.perso.neuf.fr/Contact.htm
 
Bonne journée


Message édité par PIerrotW le 14-01-2009 à 12:41:13
n°1945703
bormat
Posté le 29-11-2009 à 18:40:44  profilanswer
 

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  HTML/CSS

  Menu horizontal depliant en CSS : Bug sous IE7

 

Sujets relatifs
Positionner un menuCoin arrondis en Css.
Problème alignement bloc CSS [terminé]Divers problèmes de CSS avec une barre de menu...
[résolu] Bug GROUP By sur MySql 3.23 ?Bug javascript sous chrome et pas ur les autres navigateurs
Adapter menu à la taille de la police du joueurGénérer un menu pdf via perl PDF::API2
[EDIT après avoir bossé un peu] Retour sur le menu principal 
Plus de sujets relatifs à : Menu horizontal depliant en CSS : Bug sous IE7


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR