Ver Mensaje Individual
  #1 (permalink)  
Antiguo 20/12/2011, 09:55
miriamgomez
 
Fecha de Ingreso: abril-2008
Mensajes: 348
Antigüedad: 16 años, 1 mes
Puntos: 1
menu desplegable

hola, tengo el siguiete codigo que muestra un menu despleglabe.

Pero los bloques se "descuelgan" hacia abajo.

Se podria hacer que se habran Hacia abajo, pero muestren las opciones en horizontal?

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  4. <title>Probando Menu Horizontal Desplegable</title>
  5.  
  6. <style type="text/css">
  7. body {
  8.     font-family: Arial, Helvetica, sans-serif;
  9.     margin: 0;
  10.     padding: 0;
  11.     }
  12. #marco {
  13.     width:455px;
  14.     margin:10px 0;
  15.     padding:0px;
  16.     text-align:left;
  17.     }
  18.  
  19. /*Credits: CSSplay */
  20. /*URL: http://www.cssplay.co.uk/menus/pro_drop2 */
  21. .preload2 {background: url(http://www.luisangelcamargo.com/wp-content/uploads/2007/12/button4a.gif);}
  22. .menu2 {padding:0; margin:0; margin-bottom:0; list-style:none; height:25px; background:#fff url(http://www.luisangelcamargo.com/wp-content/uploads/2007/12/fd_menu.gif) repeat-x; position:relative; font-family:arial, verdana, sans-serif; }
  23. .menu2 li.top {display:block; float:left; position:relative;}
  24. .menu2 li a.top_link {display:block; float:left; height:25px; margin-left:6px; line-height:25px; color:#333; text-decoration:none; font-size:11px; font-weight:bold; padding:0 0 0 6px; cursor:pointer;}
  25. .menu2 li a.top_link span {float:left; display:block; padding:0 10px 0 6px; height:40px;}
  26. .menu2 li a.top_link span.down {float:left; display:block; padding:0 10px 0 6px; height:25px;/*background:url(prodrop2/down.gif) no-repeat right top;*/}
  27. .menu2 li a.top_link:hover {color:#fff;  background:url(http://www.luisangelcamargo.com/wp-content/uploads/2007/12/button4a.gif);}
  28. .menu2 li a.top_link:hover span { background:url(http://www.luisangelcamargo.com/wp-content/uploads/2007/12/button4a.gif)}
  29. .menu2 li a.top_link:hover span.down { background:url(http://www.luisangelcamargo.com/wp-content/uploads/2007/12/button4a.gif)}
  30.  
  31. .menu2 li:hover > a.top_link {color:#fff; background:url(http://www.luisangelcamargo.com/wp-content/uploads/2007/12/button4a.gif);}
  32. .menu2 li:hover > a.top_link span {background:url(http://www.luisangelcamargo.com/wp-content/uploads/2007/12/button4a.gif);}
  33. .menu2 li:hover > a.top_link span.down {background:url(http://www.luisangelcamargo.com/wp-content/uploads/2007/12/button4a.gif);}
  34.  
  35.  
  36. .menu2 table {border-collapse:collapse; width:0; height:0; position:absolute; top:0; left:0;}
  37.  
  38. /* Default link styling */
  39.  
  40. /* Style the list OR link hover. Depends on which browser is used */
  41.  
  42. .menu2 a:hover {visibility:visible;}
  43. .menu2 li:hover {position:relative; z-index:200;}
  44.  
  45. /* keep the 'next' level invisible by placing it off screen. */
  46. .menu2 ul,
  47. .menu2 :hover ul ul,
  48. .menu2 :hover ul :hover ul ul,
  49. .menu2 :hover ul :hover ul :hover ul ul,
  50. .menu2 :hover ul :hover ul :hover ul :hover ul ul {position:absolute; left:-9999px; top:-9999px; width:0; height:0; margin:0; padding:0; list-style:none;}
  51.  
  52. .menu2 :hover ul.sub {left:6px; top:25px; background: #fff; padding:0; /*border:1px solid #1E8BB5; white-space:nowrap;*/ width:auto; height:auto; font-weight:normal;}
  53. .menu2 :hover ul.sub li {display:block; /*height:20px; */position:relative; float:left; width:160px; border-bottom:1px solid #005FB9; border-left:1px solid #005FB9; border-right:1px solid #005FB9; margin-bottom:0;}
  54. .menu2 :hover ul.sub li a {display:block; height:auto; font-size:11px; padding:4px 3px; line-height:1; color:#005FB9; text-decoration:none;}
  55. .menu2 :hover ul.sub li a.fly {background:#fff  url(http://www.luisangelcamargo.com/wp-content/uploads/2007/12/vineta_menu.gif) no-repeat 150px 6px;}
  56. .menu2 :hover ul.sub li a:hover {background:#000000; color:#ffffff;}
  57. .menu2 :hover ul.sub li a.fly:hover {background:#000000 url(http://www.luisangelcamargo.com/wp-content/uploads/2007/12/vineta_menu.gif) no-repeat 150px 6px;}
  58. .menu2 :hover ul li:hover > a.fly {background:#E5FAFC}
  59.  
  60. .menu2 :hover ul :hover ul,
  61. .menu2 :hover ul :hover ul :hover ul,
  62. .menu2 :hover ul :hover ul :hover ul :hover ul,
  63. .menu2 :hover ul :hover ul :hover ul :hover ul :hover ul
  64. {left:160px; top:-1px; background: #fff; padding:0; /* white-space:nowrap; */width:auto; z-index:300; height:auto;}
  65. .menu2 :hover ul.sub li ul {border-top:1px solid #005FB9; background: #fff; z-index:300;}
  66. </head>
  67. <div id="marco">
  68. <span class="preload2"></span>
  69. <!--MENU-->
  70. <ul class="menu2"><img src="http://www.luisangelcamargo.com/wp-content/uploads/2007/12/menu_izq.gif" align="left" /><img src="http://www.luisangelcamargo.com/wp-content/uploads/2007/12/menu_der.gif" align="right"/>
  71.  
  72. <li class="top"><a href="#" id="Menu1" class="top_link"><span class="down">Menu1</span>
  73.  
  74. <!--[if gte IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
  75. <ul class="sub">
  76. <li><a href="#">Link 1.1</a></li>
  77. <li><a href="#">Link 1.2</a></li>
  78. <li><a href="#">Link 1.3</a></li>
  79. <li><a href="#">Link 1.4</a></li>
  80. </ul>
  81. <!--[if lte IE 6]></td></tr></table></a><![endif]-->
  82. </li>
  83.  
  84. <li class="top"><a href="#" id="Menu2" class="top_link"><span class="down">Menu2</span>
  85. <!--[if gte IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
  86.  
  87. <ul class="sub">
  88. <li><a href="#">Link 2.1</a></li>
  89. <li><a href="#">Link 2.2</a></li>
  90. <li><a href="#">Link 2.3</a></li>
  91. <li><a href="#">Link 2.4</a></li>
  92. </ul>
  93. <!--[if lte IE 6]></td></tr></table></a><![endif]-->
  94. </li>
  95.  
  96. <li class="top"><a href="#" id="Menu3" class="top_link"><span class="down">Menu3</span>
  97. <!--[if gte IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
  98. <ul class="sub">
  99.  
  100. <li><a href="#">Link 3.1</a></li>
  101. <li><a href="#">Link 3.2</a></li>
  102.  
  103. <li class="mid"><a href="#" class="fly">Link 3.3
  104. <!--[if gte IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
  105. <ul>
  106. <li><a href="#">Link 3.3.1</a></li>
  107. <li><a href="#">Link 3.3.2</a></li>
  108. <li><a href="#">Link 3.3.3</a></li>
  109. <li><a href="#">Link 3.3.4</a></li>
  110. </ul>
  111.  
  112. <!--[if lte IE 6]></td></tr></table></a><![endif]-->
  113. </li>
  114.  
  115. <li class="mid"><a href="#" class="fly">Link 3.4
  116. <!--[if gte IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
  117. <ul>
  118. <li><a href="#">Link 3.4.1</a></li>
  119. <li><a href="#">Link 3.4.2</a></li>
  120. <li><a href="#">Link 3.4.3</a></li>
  121. <li><a href="#">Link 3.4.4</a></li>
  122. </ul>
  123. <!--[if lte IE 6]></td></tr></table></a><![endif]-->
  124. </li>
  125.  
  126. </ul>
  127. <!--[if lte IE 6]></td></tr></table></a><![endif]-->
  128. </li>
  129.  
  130. </ul>
  131. <!-- FIN MENU-->
  132. </div>
  133. </body>
  134. </html>