Ver Mensaje Individual
  #15 (permalink)  
Antiguo 15/10/2012, 17:41
Avatar de flashmax
flashmax
 
Fecha de Ingreso: julio-2012
Ubicación: Bs.As. Argentina
Mensajes: 507
Antigüedad: 11 años, 9 meses
Puntos: 86
Respuesta: Centrar un menu? que no se centra..

hola te dejo un ejemplo de como centrar el menu:
Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<style type="text/css">
#menu1{ 
clear: both; 
float: left; 
overflow: hidden; 
width: 100%; 
} 

#menu { 
float: left; 
left: 50%; 
list-style-type: none;
margin: 0 auto; padding: 
0; position: relative; 
} 

#menu li { 
float: left; 
position: relative; 
right: 50%; 
} 

#menu a { 
background: none repeat scroll 0 0 #000; 
border: 1px solid #CCC; 
color: #FFF; 
display: block; 
padding: 4px 10px;
text-decoration: none;
width: auto; 
}

</style>
</head>

<body>
<div id="menu1"> 
<ul id="menu"> 
<li><a href="/pagina1.html">Página 1</a></li> 
<li><a href="/pagina2.html">Página 2</a></li> 
<li><a href="/pagina3.html">Página 3</a></li> 
<li><a href="/pagina4.html">Página 4</a></li> 
</ul> 
</div>
</body>
</html> 
__________________
Saludos!
----------------------------------------------------------