Ciao ragazzi,
ho trovato su internet un menu fatto in css che fa al caso mio. L'ho modificato e sostanzialmente ho ottenuto quello che volevo. Unico problema è che al passaggio del mouse sulla parola, che apre in sottomenù, a volte crea problemi con i browser. Vi chiedo se potete fare anche voi delle prove con ie7 - firefox - safari e magari se vi riesce risolvermi il problema in modo che sia ok in tutti i browser. Grazie.
[html]
<!-- Begin Menu Columns -->
<div id="menu_div">
<div class="menu">
<ul>
<li>UNO<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="../link1.html" title="link1">link1</a></li>
<li><a href="../link2.html" title="link2">link2</a></li>
<li><a href="../link3.html" title="link3">link3</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li>DUE<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="../link1.html" title="link1">link1</a></li>
<li><a href="../link2.html" title="link2">link2</a></li>
<li><a href="../link3.html" title="link3">link3</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li>TRE<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="../link1.html" title="link1">link1</a></li>
<li><a href="../link2.html" title="link2">link2</a></li>
<li><a href="../link3.html" title="link3">link3</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li><a href="../about.html">about</a>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
</ul>
</div>
</div>
<!-- End Menu Columns -->
[/html]
/* Menu */
#menu_div {
background-color: White;
width: 912px;
height: 27px;
}
.menu1_div {
width: 225px;
height: 27px;
margin-right: 4px;
float:left;
text-align: center;
}
.menu2_div {
width: 225px;
height: 27px;
font-size:8pt;
float:left;
text-align: center;
}
/*Parte CSS Menu */
/* style the outer div to give it width */
.menu {
width:912px;
height:20px;
margin-top:100px;
}
/* remove all the bullets, borders and padding from the default list styling */
.menu ul {
padding:0;
margin:0;
list-style-type:none;
}
.menu ul ul {
width:150px;
}
/* float the list to make it horizontal and a relative positon so that you can control the dropdown menu positon */
.menu li {
float:left;
width:228px;
position:relative;
text-align: center;
font-size:12px;
}
/* style the links for the top level */
.menu a {
display:block;
font-size:10px;
text-decoration:none;
color:Black;
text-align: center;
width:227px;
height:15px;
background: White;
}
.menu a:visited {
display:block;
text-decoration:underline;
}
/* style the table so that it takes no part in the layout - required for IE to work */
.menu table {border-collapse:collapse; border:0; position:absolute; left:0; bottom:-1px;}
/* hide the sub levels and give them a positon absolute so that they take up no room */
.menu ul ul {
visibility:hidden;
position:absolute;
bottom:15px;
left:0;
width:228px;
}
/* style the top level hover */
.menu :hover > a, .menu ul ul :hover > a {
color:Black;
background: White;
}
/* make the second level visible when hover on first level list OR link */
.menu ul li:hover ul,
.menu ul a:hover ul{
visibility:visible;
height:auto;
}