Visualizzazione dei risultati da 1 a 2 su 2

Discussione: Menu da 2 a 3 livelli

  1. #1
    Utente di HTML.it
    Registrato dal
    Jan 2003
    Messaggi
    42

    Menu da 2 a 3 livelli

    Ciao a tutti:
    Ho (realizzato) questo menù a 2 livelli:

    //Codice CSS
    #nav, #nav ul { /* all lists */
    padding: 0;
    margin: 0;
    list-style: none;
    line-height: 1;
    }

    #nav a {
    display: block;
    width: 10em;
    }

    #nav li { /* all list items */
    float: left;
    width: 10em; /* width needed or else Opera goes nuts */
    }

    #nav li ul { /* second-level lists */
    position: absolute;
    background: <%=COLOR_4%>;
    width: 10em;
    left: -999em; /* using left instead of display to hide menus because display: none isn't read by screen readers */
    }

    #nav li:hover ul, #nav li.sfhover ul { /* lists nested under hovered list items */
    left: auto;
    }


    //Codice JS
    <script language="javascript" type="text/javascript">
    <!--
    sfHover = function() {
    var sfEls = document.getElementById("nav").getElementsByTagNam e("LI");
    for (var i=0; i<sfEls.length; i++) {
    sfEls[i].onmouseover=function() {
    this.className+=" sfhover";
    }
    sfEls[i].onmouseout=function() {
    this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
    }
    }
    }
    if (window.attachEvent) window.attachEvent("onload", sfHover);
    -->
    </script>

    //Codice HTML
    <ul id="nav">[*]Livello 1
    <ul>
    [*]Livello 2
    [/list]
    [/list]


    La domanda è come posso implementarlo a 3 livelli???

  2. #2
    Utente di HTML.it
    Registrato dal
    Jan 2003
    Messaggi
    42
    nessuno???

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.