Florian: Pull-Down-Menu

Beitrag lesen

Code:
function init() {
        if (n) {
         drop1 = document.pull1; drop2 = document.pull2;
         drop3 = document.pull3;drop4 = document.pull4;
         drop5 = document.pull5;drop6 = document.pull6;
         }
  if (ie) {
   drop1 = pull1.style; drop2 = pull2.style;
   drop3 = pull3.style; drop4 = pull4.style;
   drop5 = pull5.style; drop6 = pull6.style;
  }
}

function showpull1() {
         if (n) {drop1.visibility = "show";}
   if (ie) {drop1.visibility = "visible";}
}

function showpull2() {
   if (n) {drop2.visibility = "show";}
   if (ie) {drop2.visibility = "visible";}
}
function showpull3() {
         if (n) {drop3.visibility = "show";}
   if (ie) {drop3.visibility = "visible";}
}
function showpull4() {
         if (n) {drop4.visibility = "show";}
   if (ie) {drop4.visibility = "visible";}
}
function showpull5() {
         if (n) {drop5.visibility = "show";}
   if (ie) {drop5.visibility = "visible";}
}
function showpull6() {
         if (n) {drop6.visibility = "show";}
   if (ie) {drop6.visibility = "visible";}
}

function hideothers1() {
  if (n) {
   drop2.visibility = "hide";
   drop3.visibility = "hide";
   drop4.visibility = "hide";
   drop5.visibility = "hide";
   drop6.visibility = "hide";}
  if (ie) {
   drop2.visibility = "hidden";
   drop3.visibility = "hidden";
   drop4.visibility = "hidden";
   drop5.visibility = "hidden";
   drop6.visibility = "hidden";
   }

}
function hideothers2() {
  if (n) {
   drop1.visibility = "hide";
   drop3.visibility = "hide";
   drop4.visibility = "hide";
   drop5.visibility = "hide";
   drop6.visibility = "hide";}
  if (ie) {
   drop1.visibility = "hidden";
   drop3.visibility = "hidden";
   drop4.visibility = "hidden";
   drop5.visibility = "hidden";
   drop6.visibility = "hidden";
   }

}
function hideothers3() {
  if (n) {
   drop2.visibility = "hide";
   drop1.visibility = "hide";
   drop4.visibility = "hide";
   drop5.visibility = "hide";
   drop6.visibility = "hide";}
  if (ie) {
   drop2.visibility = "hidden";
   drop1.visibility = "hidden";
   drop4.visibility = "hidden";
   drop5.visibility = "hidden";
   drop6.visibility = "hidden";
   }

}
function hideothers4() {
  if (n) {
   drop2.visibility = "hide";
   drop3.visibility = "hide";
   drop1.visibility = "hide";
   drop5.visibility = "hide";
   drop6.visibility = "hide";}
  if (ie) {
   drop2.visibility = "hidden";
   drop3.visibility = "hidden";
   drop1.visibility = "hidden";
   drop5.visibility = "hidden";
   drop6.visibility = "hidden";
   }

}
function hideothers5() {
  if (n) {
   drop2.visibility = "hide";
   drop3.visibility = "hide";
   drop4.visibility = "hide";
   drop1.visibility = "hide";
   drop6.visibility = "hide";}
  if (ie) {
   drop2.visibility = "hidden";
   drop3.visibility = "hidden";
   drop4.visibility = "hidden";
   drop1.visibility = "hidden";
   drop6.visibility = "hidden";
   }

}
function hideothers6() {
  if (n) {
   drop2.visibility = "hide";
   drop3.visibility = "hide";
   drop4.visibility = "hide";
   drop5.visibility = "hide";
   drop1.visibility = "hide";}
  if (ie) {
   drop2.visibility = "hidden";
   drop3.visibility = "hidden";
   drop4.visibility = "hidden";
   drop5.visibility = "hidden";
   drop1.visibility = "hidden";
   }

}

//-->
</script>

<STYLE>
#menu1 {
LEFT: 0px; POSITION: relative; TOP: 0px; z-index:2
}
#menu2 {
LEFT: 0px; POSITION: relative; TOP: 0px; z-index:2
}
#menu3 {
LEFT: 0px; POSITION: relative; TOP: 0px; z-index:2
}
#menu4 {
LEFT: 0px; POSITION: relative; TOP: 0px; z-index:2
}
#menu5 {
LEFT: 0px; POSITION: relative; TOP: 0px; z-index:2
}
#menu6 {
LEFT: 0px; POSITION: relative; TOP: 0px; z-index:2
}
#pull1 {
VISIBILITY: hidden; LEFT: 0px; POSITION: relative; TOP: -100px; z-index:2
}
#pull2 {
VISIBILITY: hidden
}
#pull3 {
VISIBILITY: hidden
}
#pull4 {
VISIBILITY: hidden
}
#pull5 {
VISIBILITY: hidden
}
#pull6 {
VISIBILITY: hidden
}
</STYLE>
</head>
<body>
...
HIER STEHT DAS MENU
<table bgcolor=yellow width=786>
<tr>
  <td>
   <DIV id=menu1>
    <A onmouseover=showpull1();hideothers1() href="">
    Top-Themen</A>
   </DIV>
  </td>
  <td>
   <DIV id=menu2>
    <A onmouseover=showpull2();hideothers2() href="">
    Alle Themen</A>
   </DIV>

</td>
  <td>
   <DIV id=menu3>
    <A onmouseover=showpull3();hideothers3() href="">
    Gesundheitsbereiche</A>
   </DIV>
  </td>
  <td>
   <DIV id=menu4>
    <A onmouseover=showpull4(menu4.style.left);hideothers4() href="">
    Adressen</A>
   </DIV>
  </td>
  <td>
   <DIV id=menu5>
    <A onmouseover=showpull5();hideothers5() href="">
    Shop</A>
   </DIV>
  </td>
  <td>
   <DIV id=menu6>
    <A onmouseover=showpull6();hideothers6() href="">
    Kontakt</A>
   </DIV>
  </td>
</tr>
</table>
<table>
<tr>
<td><DIV id=pull1>1</td>
<td><DIV id=pull2>2</td>
<td><DIV id=pull3>3</td>
<td><DIV id=pull4>4</td>
<td><DIV id=pull5>5</td>
<td><DIV id=pull6>6</td>
</tr>
</table>
Text
Frage:
Wie erreiche ich, dass die Pulldown-Menus den text überlappen? und nicht drüberstehen?

Besten Dank
Florian