Ver Mensaje Individual
  #7 (permalink)  
Antiguo 22/10/2008, 07:53
Zptweb
 
Fecha de Ingreso: mayo-2007
Mensajes: 68
Antigüedad: 16 años, 11 meses
Puntos: 0
Respuesta: Div hover no se ve igual

Bien, quiero que con este código

<div style="z-index: 4; font-family: Arial;font-size: 15px; cursor: pointer; font-weight: bold;outline: none;
float: left;background-color: #9fcf66;
width: 110px; position: relative; height: 40px; text-align: center;color: #368304;" class="barra" id="barra"><div style="margin-top: 10px;"><a href="http://new-tools.addictools.com" title="New tools">New tools</a></div></div>

Lo que ves de la etiqueta style, quede en un class, y ese class vaya asignado a un enlace, para que cuando clickes en el div ( ya sea color de fondo o enlace), cambie de color, y al mismo tiempo, siga el enlace.

Por ejemplo, ahora, como veis a continuación, con esto si me coje el enlace todo el div, pero no puedo aplicar efecto rollover, o no me sale:

<a href="http://new-tools.addictools.com" title="New tools" class="stup"><div style="z-index: 4; font-family: Arial;font-size: 15px; cursor: pointer; font-weight: bold;outline: none;
float: left;background-color: #9fcf66;
width: 110px; position: relative; height: 40px; text-align: center;color: #368304;" class="stup"><div style="margin-top: 10px;">New tools</div></div></a>

Con este css no puedo aplicarle el efecto hover, sí cuando no está hover:

a.stup div {
z-index: 4; font-family: Arial;font-size: 15px; cursor: pointer; font-weight: bold;outline: none;
color: white;
display: block;
}

a.stup div a: hover {
z-index: 4; font-family: Arial;font-size: 15px; cursor: pointer; font-weight: bold;outline: none;
color: black;
display: block;
}

Saludos.

Última edición por Zptweb; 22/10/2008 a las 07:59