Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change link color on div hover

Tags:

css

How do I change my link colors when I hover a div?

I tried to use:

#voltarTEST {
    width: 80px;
    height: 62px;
    padding-top: 16px;
    background-image: url(../img/multiLangImage/Seta11.png);
    background-repeat: no-repeat;
}
#seguinteBtn {
    width: 80px;
    height: 62px;
    padding-top: 16px;
    background-image: url(../img/multiLangImage/Seta21.png);
    background-repeat: no-repeat;
    text-decoration: none;
    color: #777;
}
#seguinteBtn:hover {
    background-image: url(../img/multiLangImage/Seta22.png);
    background-repeat: no-repeat;
    text-decoration: none;
    color: #FFF;
}
#voltarText {
/*  padding-right: 10px;*/
    padding-left: 30px;
}
#voltarNEText {
/*  padding-right: 10px;*/
    padding-left: 30px;
}
#voltarTEST:hover {
    background-image: url(../img/multiLangImage/Seta12.png);
    background-repeat: no-repeat;
}
#voltarTEST a {
    text-decoration: none;
    font-size: x-small;
    font-family: Verdana;
    text-decoration: none;
    color: #999;
}
#voltarTEST a:hover {
    text-decoration: none;
    font-size: x-small;
    font-family: Verdana;
    text-decoration: none;
    color: #FFF;
}
#dataUltimaSincMSG {
    margin-bottom: 0;
}
#estadoSinc {
    margin-bottom: 0;
}

But that did not work, this only changes color when I hover over the link.

like image 945
Astronaut Avatar asked Jun 25 '12 16:06

Astronaut


People also ask

How do you change the color of a hover link?

To change the color of your link on hover, use the :hover pseudo property on the link's class and give it a different color.

How do I change the color of an active link in CSS?

To change the link color, we have to use the color property of CSS. The name of the color can be given in any valid format, such as the color name, rgb() value, or HEX value.

Can hover be applied on Div?

To display div element using CSS on hover a tag: First, set the div element invisible i.e display:none;. By using the adjacent sibling selector and hover on a tag to display the div element.


1 Answers

Add this:

#voltarTEST:hover a{
    text-decoration: none;
    font-size: x-small;
    font-family: Verdana;
    text-decoration: none;
    color:#FFF;
}
like image 125
SVS Avatar answered Oct 16 '22 10:10

SVS