ugrás a tartalomhoz

JavaScript Menü + láthatóság

Anonymous · 2005. Már. 27. (V), 19.02
Sziasztok!
Az a problemam, hogy keszitettem egy javascript menut ami alatt van egy select menu. Amikor lenyitom a JS menut, akkor egy resze nem laccik a select miatt. tudja valaki hogy mi lehet az oka ?
itt egy pelda kod a problemamra:
  1. <script type="text/javascript">  
  2. <!--  
  3. function lenyit(id) {  
  4. var lenyito = document.getElementById(id);  
  5.     for (var i = 1; i<=10; i++) {  
  6.         if (document.getElementById('menu'+i)) {document.getElementById('menu'+i).style.display='none';}  
  7.     }  
  8. if (lenyito) {lenyito.style.display='block'; lenyito.style.position='absolute';}  
  9. }  
  10. //-->  
  11. </script>  
  12. <style type=text/css>  
  13. dl, dt, dd, ul, li {  
  14. margin: 0;  
  15. padding: 0;  
  16. list-style-type: none;  
  17. }  
  18.  
  19.  
  20. #menu {  
  21.     width: 100px;  
  22.     height: 19px;  
  23.     border-bottom: 2px solid white;  
  24.     position: absolute;  
  25.     padding-left: 3px;  
  26.     text-align: center;  
  27.     font-size: 12px;  
  28.     }  
  29.  
  30. #menu dl {  
  31. float: left;  
  32. color: white;  
  33.   
  34. }  
  35. #menu dt {  
  36. cursor: pointer;  
  37. text-align: center;  
  38. font-weight: bold;  
  39. border: 1px solid white;  
  40. margin: 1px;  
  41. background-color: white;  
  42. color: white;  
  43.   
  44. }  
  45. #menu dd {  
  46. display: none;  
  47. border: 1px solid white;  
  48. background-color: gray;  
  49.   
  50. }  
  51.   
  52. </style>  
  53.   
  54.   
  55. <div id=menu>  
  56.   
  57.     <dl>  
  58.         <dt style="width:100px"; onmouseover="javascript:lenyit('menu1');">                                                       <a href="#">Menu</a></dt>  
  59.           <dd id="menu1" onmouseout="javascript:lenyit('');" onmouseover="javascript:lenyit('menu1');">  
  60.             <ul style="width: 100px; border: 1px solid white;">  
  61.                 <li onMouseOver="this.style.backgroundColor='#F77394'" onMouseOut="this.style.backgroundColor='gray'">                            <a href="#">          1   </a></li>  
  62.                 <li onMouseOver="this.style.backgroundColor='#F77394'" onMouseOut="this.style.backgroundColor='gray'">                            <a href="#">          2   </a></li>  
  63.                 <li onMouseOver="this.style.backgroundColor='#F77394'" onMouseOut="this.style.backgroundColor='gray'">                            <a href="#">          3   </a></li>  
  64.                 <li onMouseOver="this.style.backgroundColor='#F77394'" onMouseOut="this.style.backgroundColor='gray'">                            <a href="#">          4       </a></li>  
  65.                 <li onMouseOver="this.style.backgroundColor='#F77394'" onMouseOut="this.style.backgroundColor='gray'">                            <a href="#">          5   </a></li>  
  66.                 <li onMouseOver="this.style.backgroundColor='#F77394'" onMouseOut="this.style.backgroundColor='gray'">                            <a href="#">          6   </a></li>  
  67.                 <li onMouseOver="this.style.backgroundColor='#F77394'" onMouseOut="this.style.backgroundColor='gray'">                            <a href="#">          7   </a></li>  
  68.                 <li onMouseOver="this.style.backgroundColor='#F77394'" onMouseOut="this.style.backgroundColor='gray'">                            <a href="#">          8   </a></li>  
  69.             </ul>  
  70.           </dd>  
  71.     </dl>  
  72.     </div>  
  73. <br><br>  
  74. <select size=5>  
  75. <option>dadasa1</option>  
  76. <option>dadasa2</option>  
  77. <option>dadasa3</option>  
  78. <option>dadasa4</option>  
  79. <option>dadasa5</option>  
  80. <option>dadasa6</option>  
  81. <option>dadasa7</option>  
  82. <option>dadasa8</option>  
  83. <option>dadasa9</option>  
  84. <option>dadasa10</option>  
  85. </select>  
 
1

Anonymus = fudom

fudom · 2005. Már. 27. (V), 22.25
Ez en voltam, csak elfelejtettem belepni. :$
2

z-index?

Anonymous · 2005. Már. 28. (H), 00.17
talán a z-index segít.
3

talan...

fudom · 2005. Már. 28. (H), 00.30
talan igen, de vagy nem jol csinaltam vagy nem muxik. nem tom. te hogyan oldanad meg z-index -el ?