Foros del Web » Programando para Internet » Javascript »

Problema con un menu

Estas en el tema de Problema con un menu en el foro de Javascript en Foros del Web. Saludos a todos. Mi codigo es elsiguiente: @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); Código HTML: Ver original <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd"> < html xmlns = ...
  #1 (permalink)  
Antiguo 16/08/2010, 14:08
 
Fecha de Ingreso: diciembre-2009
Mensajes: 128
Antigüedad: 14 años, 4 meses
Puntos: 0
Problema con un menu

Saludos a todos. Mi codigo es elsiguiente:

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  3.  
  4.  
  5. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
  6.  
  7. <script type="text/javascript" src="ddaccordion.js">
  8.  
  9. /***********************************************
  10. * Accordion Content script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
  11. * Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
  12. * This notice must stay intact for legal use
  13. ***********************************************/
  14.  
  15.  
  16.  
  17. <script type="text/javascript">
  18.  
  19.  
  20. ddaccordion.init({
  21.     headerclass: "submenuheader", //Shared CSS class name of headers group
  22.     contentclass: "submenu", //Shared CSS class name of contents group
  23.     revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
  24.     mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
  25.     collapseprev: true, //Collapse previous content (so only one open at any time)? true/false
  26.     defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
  27.     onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
  28.     animatedefault: false, //Should contents open by default be animated into view?
  29.     persiststate: true, //persist state of opened contents within browser session?
  30.     toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
  31.     togglehtml: ["suffix", "<img src='plus.gif' class='statusicon' />", "<img src='minus.gif' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
  32.     animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
  33.     oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
  34.         //do nothing
  35.     },
  36.     onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
  37.         //do nothing
  38.     }
  39. })
  40.  
  41.  
  42.  
  43.  
  44. <style type="text/css">
  45.  
  46. .glossymenu{
  47. margin: 5px 0;
  48. padding: 0;
  49. width: 170px; /*width of menu*/
  50. border: 1px solid #9A9A9A;
  51. border-bottom-width: 0;
  52. }
  53.  
  54. .glossymenu a.menuitem{
  55. background: black url(glossyback.gif) repeat-x bottom left;
  56. font: bold 14px "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, sans-serif;
  57. color: white;
  58. display: block;
  59. position: relative; /*To help in the anchoring of the ".statusicon" icon image*/
  60. width: auto;
  61. padding: 4px 0;
  62. padding-left: 10px;
  63. text-decoration: none;
  64. }
  65.  
  66.  
  67. .glossymenu a.menuitem:visited, .glossymenu .menuitem:active{
  68. color: white;
  69. }
  70.  
  71. .glossymenu a.menuitem .statusicon{ /*CSS for icon image that gets dynamically added to headers*/
  72. position: absolute;
  73. top: 5px;
  74. right: 5px;
  75. border: none;
  76. }
  77.  
  78. .glossymenu a.menuitem:hover{
  79. background-image: url(glossyback2.gif);
  80. }
  81.  
  82. .glossymenu div.submenu{ /*DIV that contains each sub menu*/
  83. background: white;
  84. }
  85.  
  86. .glossymenu div.submenu ul{ /*UL of each sub menu*/
  87. list-style-type: none;
  88. margin: 0;
  89. padding: 0;
  90. }
  91.  
  92. .glossymenu div.submenu ul li{
  93. border-bottom: 1px solid blue;
  94. }
  95.  
  96. .glossymenu div.submenu ul li a{
  97. display: block;
  98. font: normal 13px "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, sans-serif;
  99. color: black;
  100. text-decoration: none;
  101. padding: 2px 0;
  102. padding-left: 10px;
  103. }
  104.  
  105. .glossymenu div.submenu ul li a:hover{
  106. background: #DFDCCB;
  107. colorz: white;
  108. }
  109.  
  110.  
  111. </head>
  112.  
  113.  
  114. <div class="glossymenu">
  115. <a class="menuitem" href="http://www.dynamicdrive.com/">Dynamic Drive</a>
  116. <a class="menuitem submenuheader" href="http://www.dynamicdrive.com/style/">CSS Examples</a>
  117. <div class="submenu">
  118.     <ul>
  119.     <li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C1/">Horizontal CSS Menus</a></li>
  120.     <li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C2/">Vertical CSS Menus</a></li>
  121.     <li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C4/">Image CSS</a></li>
  122.     <li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C6/">Form CSS</a></li>
  123.     <li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C5/">DIVs and containers</a></li>
  124.     <li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C7/">Links & Buttons</a></li>
  125.     <li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C8/">Other</a></li>
  126.     <li><a href="http://www.dynamicdrive.com/style/csslibrary/all/">Browse All</a></li>
  127.     </ul>
  128. </div>
  129. <a class="menuitem" href="http://www.javascriptkit.com/jsref/">JavaScript Reference</a>
  130. <a class="menuitem" href="http://www.javascriptkit.com/domref/">DOM Reference</a>
  131. <a class="menuitem submenuheader" href="http://www.cssdrive.com">CSS Drive</a>
  132. <div class="submenu">
  133.     <ul>
  134.     <li><a href="http://www.cssdrive.com">CSS Gallery</a></li>
  135.     <li><a href="http://www.cssdrive.com/index.php/menudesigns/">Menu Gallery</a></li>
  136.     <li><a href="http://www.cssdrive.com/index.php/news/">Web Design News</a></li>
  137.     <li><a href="http://www.cssdrive.com/index.php/examples/">CSS Examples</a></li>
  138.     <li><a href="http://www.cssdrive.com/index.php/main/csscompressor/">CSS Compressor</a></li>
  139.     <li><a href="http://www.dynamicdrive.com/forums/forumdisplay.php?f=6">CSS Forums</a></li>
  140.     </ul>
  141.     <img src="http://i27.tinypic.com/sy7295.gif" style="margin: 10px 5px" />
  142. </div>
  143. <a class="menuitem" href="http://www.codingforums.com/" style="border-bottom-width: 0">Coding Forums</a>
  144. </div>
  145.  
  146. <p>Assuming the current page is named "current.htm", the below links when navigated to expands a particular header on that page:</p>
  147. <p>
  148. - <a href="current.htm?submenuheader=0">Expand 1st header within "submenuheader" header group</a><br />
  149. </p>
  150.  
  151. <p>Helpful links: </p>
  152. <p>
  153. - <a href="http://www.dynamicdrive.com/dynamicindex17/ddaccordion_suppliment.htm">Adding arbitrary links hat expand/ collapse the contents</a><br />
  154. - <a href="http://www.dynamicdrive.com/dynamicindex17/ddaccordion_suppliment2.htm">Taking advantage of the oninit() and onopenclose() event handlers</a><br />
  155. </p>
  156.  
  157. </body>
  158. </html>

y me genera el siguiente menu:



el problema que tengo son las franjas blancas que me aparecen entre Dynamic Drive y CSS Examples, asi como la que sale entre DOM Reference y CSS Drive, Como se dan cuenta solo salen en donde empieza la parte del menu que tiene sub menu, espero me puedan ayudar con esto porque no se que pasa ya que este codigo lo baje de una pagina donde funciona perfectamente, saludos.

Etiquetas: Ninguno
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:13.