Menu con css centrato in orizzontale

di il
5 risposte

Menu con css centrato in orizzontale

Ho trovato in internet uno script che genera un menu orizzontale che mi piace molto per l'efetto grafico. Unico problema: non riesco a centrarlo in orizzontale (pur avendo provato a variare i valori all'interno dello script css.
Qualcuno è in grado di aiutarmi?

Questo lo script html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dt">

<html>

<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Logo</title>
<link rel="stylesheet" href="Style.css" type="text/css" />
</head>

<body style="background-color:#000000">
<ul id="cssmenu" class="topmenu">
<li class="topfirst"><a href="Home.html" target="secondo" title="Home">Home</a></li>
<li class="topmenu"><a href="Chi sono.html" target="secondo" title="Chi sono">Chi sono</a></li>
<li class="topmenu"><a href="Riconoscimenti.html" target="secondo" title="Riconoscimenti">Riconoscimenti</a></li>
<li class="topmenu"><a href="Verdura.html" target="secondo" title="Verdura in intaglio">Verdura in intaglio</a></li>
<li class="topmenu"><a href="Partecipazioni.html" target="secondo" title="Partecipazioni">Partecipazioni</a></li>
<li class="toplast"><a href="Contatti.html" target="secondo" title="Contatti">Contatti</a></li>
</ul>
</body>

</html>


e questo lo script css

ul#cssmenu,ul#cssmenu
ul{margin:0;
list-style:none;
padding:0;
background-color:#dedede;
border-width:1px;
border-style:solid;
border-color:#5f5f5f;
-moz-border-radius:0px;
-webkit-border-radius:0px;
border-radius:0px;}

ul#cssmenu
ul{display:none;
position:absolute;
left:0;
top:10%;
-moz-box-shadow:3.5px 3.5px 5px #000000;
-webkit-box-shadow:3.5px 3.5px 5px #000000;
box-shadow:3.5px 3.5px 5px #000000;
padding:0 10px 10px;
background-color:#FFFFFF;
border-radius:0px;
-moz-border-radius:0px;
-webkit-border-radius:0px;
border-color:#d4d4d4;}

ul#cssmenu
li:hover>*{display:block;}

ul#cssmenu
li:hover{position:relative;}

ul#cssmenu
ul ul{position:absolute;
left:100%;
top:0;}

ul#cssmenu
{display:block;
font-size:0;
float:left;}

ul#cssmenu
li{display:block;
white-space:nowrap;
font-size:0;
float:left;}

ul#cssmenu>li,ul#cssmenu
li{margin:0;}

ul#cssmenu
a:active, ul#cssmenu a:focus{outline-style:none;}

ul#cssmenu
a{display:block;
vertical-align:middle;
text-align:left;
text-decoration:none;
font:bold 17px Verdana;
color:#ffff00;
text-shadow:#FFF 0 0 1px;
cursor:pointer;
padding:10px;
background-color:#aa007f;
background-image:url("mainbk.png");
background-repeat:repeat;
background-position:0 0;
border-width:0 0 0 1px;
border-style:solid;
border-color:#C0C0C0;}

ul#cssmenu
ul li{float:none;
margin:10px 0 0;}

ul#cssmenu
ul a{text-align:left;
padding:4px;
background-color:#FFFFFF;
background-image:none;
border-width:0;
border-radius:0px;
-moz-border-radius:0px;
-webkit-border-radius:0px;
font:14px Tahoma;
color:#000;
text-decoration:none;}

ul#cssmenu
li:hover>a{background-color:#f8ac00;
border-color:#C0C0C0;
border-style:solid;
font:bold 17px Verdana;
color:#000000;
text-decoration:none;
text-shadow:#FFF 0 0 1px;
background-image:url("mainbk.png");
background-position:0 100px;}

ul#cssmenu
img{border:none;
vertical-align:middle;
margin-right:10px;}

ul#cssmenu
img.over{display:none;}

ul#cssmenu
li:hover > a img.def{display:none;}

ul#cssmenu
li:hover > a img.over{display:inline;}

ul#cssmenu
span{display:block;
overflow:visible;
background-position:right center;
background-repeat:no-repeat;
padding-right:0px;}

ul#cssmenu
ul li:hover>a{background-color:#FFFFFF;
background-image:none;
font:14px Tahoma;
color:#868686;
text-decoration:none;}

ul#cssmenu
li.topfirst>a{height:5px;
line-height:5px;
border-radius:0px 0 0 0px;
-moz-border-radius:0px 0 0 0px;
-webkit-border-radius:0px;
-webkit-border-top-right-radius:0;
-webkit-border-bottom-right-radius:0;}

ul#cssmenu
li.topfirst:hover>a{line-height:5px;}

ul#cssmenu
li.topmenu>a{height:5px;
line-height:5px;}

ul#cssmenu
li.topmenu:hover>a{line-height:5px;}

ul#cssmenu
li.toplast>a{height:5px;
line-height:5px;
border-radius:0 0px 0px 0;
-moz-border-radius:0 0px 0px 0;
-webkit-border-radius:0;
-webkit-border-top-right-radius:0px;
-webkit-border-bottom-right-radius:0px;}

ul#cssmenu

in allegato invio anche 3 file grafici utilizzati dallo script

Ringrazio fin da ora chi potrà aiutarmi
Allegati:
8483_18f43a4e5e9e36829a2bf4dd2838c9f6.png
8483_18f43a4e5e9e36829a2bf4dd2838c9f6.png

8483_f9130653fe31adc63ce99ccf2d02470a.png
8483_f9130653fe31adc63ce99ccf2d02470a.png

5 Risposte

Devi accedere o registrarti per scrivere nel forum
5 risposte