Si usando una tabella.
codice:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> <style type="text/css"> <!-- .hidden {display:none} .shown {display:block} .mainMenu {color:white;background-color:navy;font-size:9pt;font-family:verdana;cursor:hand} .subMenu {color:navy;background-color:white;font-size:9pt;font-family:verdana;cursor:hand} --> </style> <script language="JavaScript" type="text/javascript"> <!-- function showHide(aDiv) { aDiv.className = aDiv.className == "hidden" ? "shown" : "hidden"; } // function showHide(aDiv) //--> </script> </head> <body> <table > <tr> <td valign="top"> <div style="width:100px" class="mainMenu" onclick="showHide(document.getElementById('subMenu1'))">Menu1</div> <div id="subMenu1" class="hidden"> <div style="width:100px" class="subMenu" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='white'"> Voce 1</div> <div style="width:100px" class="subMenu" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='white'"> Voce 2</div> <div style="width:100px" class="subMenu" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='white'"> Voce 3</div> <div style="width:100px" class="subMenu" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='white'"> Voce 4</div> </div> </td> <td valign="top"> <div style="width:100px" class="mainMenu" onclick="showHide(document.getElementById('subMenu2'))">Menu2</div> <div id="subMenu2" class="hidden"> <div style="width:100px" class="subMenu" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='white'"> Voce 1</div> <div style="width:100px" class="subMenu" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='white'"> Voce 2</div> <div style="width:100px" class="subMenu" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='white'"> Voce 3</div> <div style="width:100px" class="subMenu" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='white'"> Voce 4</div> </div> </td> </tr> <tr> <td valign="top"> <div style="width:100px" class="mainMenu" onclick="showHide(document.getElementById('subMenu3'))">Menu3</div> <div id="subMenu3" class="hidden"> <div style="width:100px" class="subMenu" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='white'"> Voce 1</div> <div style="width:100px" class="subMenu" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='white'"> Voce 2</div> <div style="width:100px" class="subMenu" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='white'"> Voce 3</div> <div style="width:100px" class="subMenu" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='white'"> Voce 4</div> </div> </td> <td valign="top"> <div style="width:100px" class="mainMenu" onclick="showHide(document.getElementById('subMenu4'))">Menu4</div> <div id="subMenu4" class="hidden"> <div style="width:100px" class="subMenu" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='white'"> Voce 1</div> <div style="width:100px" class="subMenu" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='white'"> Voce 2</div> <div style="width:100px" class="subMenu" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='white'"> Voce 3</div> <div style="width:100px" class="subMenu" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='white'"> Voce 4</div> </div> </td> </tr> </table> </body> </html>

Rispondi quotando