DADSCHE: Navigationsleiste mit Ebenen

Beitrag lesen

Hier nun der Quelltext (hab ich nach irgendeinem Tut. gemacht..)

Gruß Dadsche
---------------------------------------------------------------------
Quelltext
---------------------------------------------------------------------
<style>

.menu
{
 position: absolute;
 top: 0;
 z-index: 2;
}

.submenu
{
 position: absolute;
     top: 22;
 z-index: 0;
 visibility: hide;
 visibility: hidden;
}

</style>
<script>
<!--

function show_layer(x)
{
 if(document.layers)
  document.layers[x].visibility="show";
 else
  document.all[x].style.visibility="visible";
}

function hide_layer(x)
{
 if(document.layers)
  document.layers[x].visibility="hide";
 else
  document.all[x].style.visibility="hidden";
}

var old;
var memold;

if(document.layers)
{
 window.captureEvents(Event.MOUSEUP);
 window.onmouseup=do_out;
} else
{
 document.onmouseup=do_out;  // oder auch: document.onmouseclick=do_out
}

function do_menu(x)
{
 if(!old)
  old=memold;

if(old!=x)
 {
  show_layer(x);
  old=x;
 } else
  old="";
}

function do_check(x)
{
 if(old && old!=x)
 {
  hide_layer(old);
  show_layer(x);
  old=x;
 }
}

function do_out()
{
 if(old)
  hide_layer(old);

memold=old; old="";
}

// -->
</script>

</head>

<body bgcolor="#0000FF" text="#0000FF" leftmargin="0"  topmargin="0">

<div id="m1" class="menu" style="left: 0;; top: 0; height: 0">
  <table cellspacing=0 cellpadding=0 border=1 width=157 height="30" bgcolor="#FFFFFF" bordercolor="#000000">
    <tr>
      <td bgcolor="#FFFFFF">
        <div align="center"><a href="javascript:do_menu('m1x')" onmouseover="do_check('m1x')">Test</a> </div>
      </td>
   </tr>
    </table>
</div>

<div id="m1x" class="submenu" style="left: 0;; height: 63; width: 157; top: 30">
  <table cellspacing=0 cellpadding=0 border=1 width=157 height="63">
    <tr>
      <td bgcolor="#FFFFFF" bordercolor="#000000" border=1 width="157" height="21" >
        <font class="font2"><a href="datei.html">  - Test</a></font></td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF" bordercolor="#000000" border=1 width="157" height="21" >
        <font class="font2"><a href="datei.html">  - Test</a></font></td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF" bordercolor="#000000" border=1 width="157" height="21" >
        <font class="font2"><a href="datei.html">  - Test</a></font></td>
    </tr>
     <tr>
      <td bgcolor="#FFFFFF" bordercolor="#000000" border=1 width="157" height="21" >
        <font class="font2"><a href="datei.html">  - Test</a></font></td>
    </tr>
  </table>
</div>