+ Antworten
Ergebnis 1 bis 2 von 2

Thema: Menüproblem :-(

  1. #1
    TP-Senior Typhus macht alles soweit korrekt Avatar von Typhus
    Registriert seit
    Jun 2002
    Beiträge
    162

    Menüproblem :-(

    Hallo,
    ich brauche eine Menüerweiterung und die einzige mögliche Lösung scheint mir Java zu sein ... und davon habe ich leider null Dunst.

    Ich habe zwei Tabellen übereinander mit jeweils 7 Spalten.
    In der oberen Tabelle habe ich in zwei Spalten jeweils ein Bild (da wird der Menü-Hauptpunkt mit einer nicht üblichen Schriftart dargestellt, deshalb als Bild und nicht als Text) welches mir dann beim MouseOver in einer Spalte der zweiten Tabelle ein Menü als Bild ausgeben soll welches dann auf die Seite verlinkt.

    Das funktioiert auch wunderbar, nur wie bekomme ich die blöde blaue Umrandung von den Bildern weg wenn ich mir das Ganze im Browser dann anschaue, das passt nicht ins Layout??? - habe versucht den "a"-Tag neu zu definieren, aber das haut nicht hin bzw. nur bei Text ... WAS MACHE ICH FALSCH???

    HTML-Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    <!--
    a {
    	text-decoration: none;
    }
    -->
    </style>
    </head>
    
    <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <table border="0" cellspacing="0" cellpadding="0">
      <tr> 
        <td width="120"><a href="#" onMouseover="showit(0)"><img src="WEB.gif" width="120" height="32"></a></td>
        <td width="120"><a href="#" onMouseover="showit(1)"><img src="WEB.gif" width="120" height="32"></a></td>
        <td width="50">&nbsp;</td>
        <td width="50">&nbsp;</td>
        <td width="50">&nbsp;</td>
        <td width="100"></td>
        <td width="50"></td>
      </tr>
    </table>
    <table border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="120">&nbsp;</td>
        <td width="120">&nbsp;</td>
        <td width="50">&nbsp;</td>
        <td width="50">&nbsp;</td>
        <td width="50">&nbsp;</td>
        <td width="50"> 
          <div id="describe" style="width:100px;height:32px" onMouseover="clear_delayhide()" onMouseout="resetit(event)"></div>
          <script language="JavaScript1.2">
    
    var submenu=new Array()
    
    submenu[0]='<a href="http://www.hallo.de"><img src="WEB.gif" width="120" height="32"></a>'
    submenu[1]='<a href="http://www.hallo.de"><img src="WEB.gif" width="120" height="32"></a>'
    
    var delay_hide=800
    
    var menuobj=document.getElementById? document.getElementById("describe") : document.all? document.all.describe : document.layers? document.dep1.document.dep2 : ""
    
    function showit(which){
    clear_delayhide()
    thecontent=(which==-1)? "" : submenu[which]
    if (document.getElementById||document.all)
    menuobj.innerHTML=thecontent
    else if (document.layers){
    menuobj.document.write(thecontent)
    menuobj.document.close()
    }
    }
    
    function resetit(e){
    if (document.all&&!menuobj.contains(e.toElement))
    delayhide=setTimeout("showit(-1)",delay_hide)
    else if (document.getElementById&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
    delayhide=setTimeout("showit(-1)",delay_hide)
    }
    
    function clear_delayhide(){
    if (window.delayhide)
    clearTimeout(delayhide)
    }
    
    function contains_ns6(a, b) {
    while (b.parentNode)
    if ((b = b.parentNode) == a)
    return true;
    return false;
    }
    
    </script> </td>
        <td width="50">&nbsp;</td>
      </tr>
    </table>
    </body>
    </html>
    
    Danke.

    Gruß,
    Markus
    Geändert von Typhus (06.03.2008 um 20:50 Uhr)

  2. #2
    TP-Senior Typhus macht alles soweit korrekt Avatar von Typhus
    Registriert seit
    Jun 2002
    Beiträge
    162
    Okay okay, hatte nen Fehler im Style:

    HTML-Code:
    img {
    	text-decoration: none;
    	border: 0;
    }
    Kann man das im JavaScript auch irgendwie steuern/unterbinden???


    Gruß,
    Markus

+ Antworten

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

     

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51