Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/10/2009, 13:22
WinderJerter
 
Fecha de Ingreso: agosto-2009
Mensajes: 292
Antigüedad: 14 años, 8 meses
Puntos: 5
navbar con boton activo

hola que tal, les cuento que estoy tratando de hacer un navbar que cuando le de click al enlase en el navbar se vea direrente a los demas botones

Código:
#navbar li, #navbar a {
	display:block;
	height:30px;
	text-align:center;
}

#navbar li {
	float:left;
	list-style-image:none;
	list-style-position:outside;
	list-style-type:none;
	margin:0;
	padding:0;
	position:relative;
	top:0;
}

#navbar-noticias {
	background:url(images/navbar-bg.jpg);
	height:30px;
	left:0;
	padding:0;
	width:200px;
}

#navbar-noticias a:hover {
	background:url(images/navbar-bg.jpg) 0 -30px;
	height:30px;
	left:0;
	width:200px;
}

#navbar-noticias .selected {
	background:url(images/navbar-bg.jpg) 0 -30px;
	height:30px;
	left:0;
	width:200px;
}

#navbar-comunidad {
	background:url(images/navbar-bg.jpg) -200px 0;
	height:30px;
	left:0;
	width:200px;
}

#navbar-comunidad a:hover {
	background:url(images/navbar-bg.jpg) -200px -30px;
	height:30px;
	left:0;
	width:200px;
}

#navbar-comunidad .selected {
	background:url(images/navbar-bg.jpg) -200px -30px;
	height:30px;
	left:0;
	width:200px;
}

#navbar-chat {
	background:url(images/navbar-bg.jpg) -400px 0;
	height:30px;
	left:0;
	width:200px;
}

#navbar-chat a:hover {
	background:url(images/navbar-bg.jpg) -400px -30px;
	height:30px;
	left:0;
	width:200px;
}

#navbar-chat .selected {
	background:url(images/navbar-bg.jpg) -400px -30px;
	height:30px;
	left:0;
	width:200px;
}

#navbar-buscador {
	background:url(images/navbar-bg.jpg) -600px 0;
	height:30px;
	left:0;
	width:200px;
}

#navbar-buscador a:hover {
	background:url(images/navbar-bg.jpg) -600px -30px;
	height:30px;
	left:0;
	width:200px;
}

#navbar-buscador .selected {
	background:url(images/navbar-bg.jpg) -600px -30px;
	height:30px;
	left:0;
	width:200px;
}

#navbar-contacto {
	background:url(images/navbar-bg.jpg) -800px 0;
	height:30px;
	left:0;
	width:200px;
}

#navbar-contacto a:hover {
	background:url(images/navbar-bg.jpg) -800px -30px;
	height:30px;
	left:0;
	width:200px;
}

#navbar-contacto .selected {
	background:url(images/navbar-bg.jpg) -800px -30px;
	height:30px;
	left:0;
	width:200px;
}
Código HTML:
 <ul id="navbar">  
        <li id="navbar-noticias"><a href="/index.php"></a></li>
        <li id="navbar-comunidad"><a href="#"></a></li>
        <li id="navbar-chat"><a href="/inicio/chat.php"></a></li>
        <li id="navbar-buscador"><a href="/inicio/buscador.php"></a></li>
        <li id="navbar-contacto"><a href="/inicio/contacto.php"></a></li>
      </ul> 
quiero que el .selected y el a:hover se vean igual pero no se que estoy haciendo mal, cuando le doy click al enlace se vuelve a su estado original,,,

aqui esta la pagina para que vean el navbar pk-network.co.cc

saludos y muchas gracias de antemano