Ver Mensaje Individual
  #6 (permalink)  
Antiguo 05/12/2011, 10:00
MACvsWINDOWS
 
Fecha de Ingreso: enero-2011
Mensajes: 158
Antigüedad: 13 años, 3 meses
Puntos: 2
Respuesta: Cambiar estilo de menu con un clic

Os pongo el código para ver qué tengo que añadir y conseguir lo que decía:

Código HTML:
<html>

<head>

<style type="text/css">

body {
	font: 11px/1.5em Verdana;
	}
	
/*menu 1 */
	
#tabs1 {
	float:left;
	width:700px;
	font-size:11px;
	line-height:normal;
	}
	
#tabs1 ul {
	margin:0;
	padding:28px 0px 0 0px;
	list-style:none;
	}
	
#tabs1 li {
	display:inline;
	margin:0;
	padding:0;
	}
	
#tabs1 a {
	float:left;
	background:url("imagenes/menus/menu1/tableft.gif") no-repeat left top;
	margin:0;
	padding:0 0 0 4px;
	text-decoration:none;
	}
	
#tabs1 a span {
	float:left;
	display:block;
	background:url("imagenes/menus/menu1/tabright.gif") no-repeat right top;
	padding:5px 15px 4px 6px;
	color:#fff;
	}
	
/* Commented Backslash Hack hides rule from IE5-Mac \*/
#tabs1 a span {float:none;}

/* End IE5-Mac hack */
#tabs1 a:hover span {
	color:#FFF;
	}
	
#tabs1 a:hover {
	background-position:0% -42px;
	}
	
#tabs1 a:hover span {
	background-position:100% -42px;
	}


/*menu 2 */

#tabs2 {
	float:left;
	width:700px;
	font-size:11px;
	line-height:normal;
	}
	
#tabs2 ul {
	margin:0;
	padding:28px 0px 0 0px;
	list-style:none;
	}
	
#tabs2 li {
	display:inline;
	margin:0;
	padding:0;
	}
	
#tabs2 a {
	float:left;
	background:url("imagenes/menus/menu1/tableft.gif") no-repeat left top;
	margin:0;
	padding:0 0 0 4px;
	text-decoration:none;
	}
	
#tabs2 a span {
	float:left;
	display:block;
	background:url("imagenes/menus/menu1/tabright.gif") no-repeat right top;
	padding:5px 15px 4px 6px;
	color:#fff;
	}
	
/* Commented Backslash Hack hides rule from IE5-Mac \*/
#tabs2 a span {float:none;}

/* End IE5-Mac hack */
#tabs2 a:hover span {
	color:#FFF;
	}
	
#tabs2 a:hover {
	background-position:0% -42px;
	}
	
#tabs2 a:hover span {
	background-position:100% -42px;
	}

#menu{
	
	text-align:center;
	
	}


</style>

</head>

<body>

<a href="#">estilo 1</a>

<p>

<a href="#">estilo 1</a>
    			
  
  <div id="menu">
  
  <div id="tabs1">
  
 				<ul>
    				<li><a href="web_entera.html"><span>boton 1</span></a></li>
    				<li><a href="web_entera.html"><span>boton 2</span></a></li>
    				<li><a href="web_entera.html"><span>boton 3</span></a></li>
    				<li><a href="web_entera.html"><span>boton 4</span></a></li>
    			</ul>
    			</div>
  
  </div>

</body>

</html> 


lo que quiero es eso, que al pulsar sobre el link, el estilo cambie. Sería que cambiara únicamente la imagen de fondo del menú.