user3765800
user3765800

Reputation: 27

Css hover change link color

I have this CSS :

<style>
#web_pagination_number {
    float:left;
    position:relative;
    width:35px;
    height:35px;
    line-height:35px;
    background-color:#111111;
    font-family:Arial;
    font-size:14px;
    color:#ffffff;
    text-align:center;
}
#web_pagination_number:hover {
    color:#111111;
    background-color:#93CF25;
}
#web_pagination_number a {
    text-decoration:none;
    color:#ffffff;
}
#web_pagination_number a:hover {
    text-decoration:none;
    color:#111111;
}
</style>

The problem i have it´s when i go over web_pagination_number , change the color of background of this div but no the color of the link , the link color only change when i go over the link

I don´t know how i can fix this

Thank´s , Regards

Upvotes: 0

Views: 112

Answers (2)

karthikr
karthikr

Reputation: 99620

Just add a property display: block on a

Demo

Upvotes: 2

Frement
Frement

Reputation: 766

You need to add :hover to your web_pagination_number id, like this:

#web_pagination_number:hover a {
  color: #333;
}

Upvotes: 2

Related Questions