#menu ul a:hover{
background: #0186ba;
background: -moz-linear-gradient(#04acec, #0186ba);
background: -webkit-gradient(linear, left top, left bottom, from(#04acec), to(#0186ba));
background: -webkit-linear-gradient(#04acec, #0186ba);
background: -o-linear-gradient(#04acec, #0186ba);
background: -ms-linear-gradient(#04acec, #0186ba);
background: linear-gradient(#04acec, #0186ba);
}
#menu ul li:first-child a{
-moz-border-radius: 5px 5px 0 0;
-webkit-border-radius: 5px 5px 0 0;
border-radius: 5px 5px 0 0;
}
#menu ul li:first-child a:after{
content: '';
position: absolute;
left: 50px;
top: -8px;
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 8px solid #444;
}
#menu ul li:first-child a:hover:after{
border-bottom-color: #04acec;
}
#menu ul li:last-child a{
-moz-border-radius: 0 0 5px 5px;
-webkit-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
}
/* Clear floated elements */
#menu:after{
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
This is the current result:
IwanttohavethismenualignedtothecenterbutsofareverythingItrieddidnotwork...
HTMLCODE
<html><title></title><head><linkrel="stylesheet" type="text/css" href="estilo.css">
</head>
<body>
<br>
<ul id="menu">
<li><a href="site.html">Pagina Inicial</a>
</li>
<li> <a href="#">Produtos</a>
<ul>
<li><a href="inserir.html">Inserir</a>
</li>
<li><a href="menuprodutos.html">Ver Produtos no Site</a>
</li>
<li><a href="procurar.html">Procurar</a>
</li>
<li><a href="remover.html">Eliminar</a>
</li>
<li><a href="listar.php">Listar</a>
</li>
</ul>
</li>
<li> <a href="site.html">A nossa Empresa</a>
<ul>
<li><a href="empresa.html">História</a>
</li>
<li><a href="val.html">Valores</a>
</li>
</ul>
</li>
<li><a href="cont.html">Contactos</a>
<ul>
<li><a href="email.html">Contacte-nos </a>
</li>
</ul>
</li>
<li> <a href="formulario.html">Formulário </a>
</li>
<li>
</ul>
<br>
<br>
<body background="stardust.png">
<div id="bodyy">
<center>
<BR>
<BR>
<BR>
<BR>
<BR>
<h1> <font color="white">Inserir Novo Produto</font> </h1>
<form name="form1" method="post" action="inserir.php">
<font color="white">Codigo:</font>
<Input type="text" name="codproduto">
<br/>
<br/>
</input>
<font color="white">Nome:</font>
<input type="text" name="nomeproduto"></input>
<br/>
<br/>
<font color="white">Quantidade:</font>
<input type="text" name="quantidade"></input>
<br/>
<br/>
<input type="submit" value="Inserir" />
<input type="reset" value="Apagar dados" />
</center>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</form>
</div>
<script>
function valida(form) {
if (form.codproduto.value == "") {
alert("Preencha o código corretamente.");
form.codigo.focus();
return false;
}
function valida(form) {
if (form.nomeproduto.value == "") {
alert("Preencha o nome corretamente.");
form.nome.focus();
return false;
}
function valida(form) {
if (form.quantidade.value == "") {
alert("Preencha a quantidade corretamente.");
form.codigo.focus();
return false;
}
</script>
<br>
<br>
<br>
<br>
<br>
</body>
</html>